From 2e9a8d6f5f435dbce171bb96b4b9d665bf5581b9 Mon Sep 17 00:00:00 2001 From: Fernando Cacciola Date: Mon, 26 May 2008 16:18:19 +0000 Subject: [PATCH] print__version committed --- .gitattributes | 7 +++ CMake/config/support/print_BOOST_version.cpp | 37 ++++++++++++ CMake/config/support/print_GMP_version.cpp | 36 +++++++++++ CMake/config/support/print_MPFR_version.cpp | 41 +++++++++++++ CMake/config/support/print_OPENGL_version.cpp | 60 +++++++++++++++++++ CMake/config/support/print_QT_version.cpp | 34 +++++++++++ CMake/config/support/print_TAUCS_version.cpp | 36 +++++++++++ CMake/config/support/print_ZLIB_version.cpp | 33 ++++++++++ 8 files changed, 284 insertions(+) create mode 100644 CMake/config/support/print_BOOST_version.cpp create mode 100644 CMake/config/support/print_GMP_version.cpp create mode 100644 CMake/config/support/print_MPFR_version.cpp create mode 100644 CMake/config/support/print_OPENGL_version.cpp create mode 100644 CMake/config/support/print_QT_version.cpp create mode 100644 CMake/config/support/print_TAUCS_version.cpp create mode 100644 CMake/config/support/print_ZLIB_version.cpp diff --git a/.gitattributes b/.gitattributes index 4a6cb8ec8c8..3de5489ee43 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1582,6 +1582,13 @@ CMake/cmake/modules/OptionalAddSubdirectory.cmake -text CMake/cmake/modules/Qt3Macros.cmake -text CMake/cmake/modules/ReadLines.cmake -text CMake/cmake/modules/UseCGAL.cmake -text +CMake/config/support/print_BOOST_version.cpp -text +CMake/config/support/print_GMP_version.cpp -text +CMake/config/support/print_MPFR_version.cpp -text +CMake/config/support/print_OPENGL_version.cpp -text +CMake/config/support/print_QT_version.cpp -text +CMake/config/support/print_TAUCS_version.cpp -text +CMake/config/support/print_ZLIB_version.cpp -text CMake/src/CGALPDB/CMakeLists.txt -text CMake/src/CGALQt/CMakeLists.txt -text CMake/src/CGALimageIO/CMakeLists.txt -text diff --git a/CMake/config/support/print_BOOST_version.cpp b/CMake/config/support/print_BOOST_version.cpp new file mode 100644 index 00000000000..2d4e01dd9de --- /dev/null +++ b/CMake/config/support/print_BOOST_version.cpp @@ -0,0 +1,37 @@ +// Copyright (c) 2005 Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany), +// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg +// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria), +// and Tel-Aviv University (Israel). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; version 2.1 of the License. +// See the file LICENSE.LGPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Installation/config/support/test_BOOST.cpp $ +// $Id: test_BOOST.cpp 32424 2006-07-12 09:26:22Z spion $ +// +// +// Author(s) : Sylvain Pion + +// Tests if BOOST is available. + +#include + +#include + +int main() +{ + std::cout << "version=" << BOOST_VERSION/100000 << "." + << ((BOOST_VERSION / 100) % 100) << "." + << BOOST_VERSION % 100 << std::endl; + + return 0; +} diff --git a/CMake/config/support/print_GMP_version.cpp b/CMake/config/support/print_GMP_version.cpp new file mode 100644 index 00000000000..b11708ff22f --- /dev/null +++ b/CMake/config/support/print_GMP_version.cpp @@ -0,0 +1,36 @@ +// Copyright (c) 2004 Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany), +// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg +// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria), +// and Tel-Aviv University (Israel). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; version 2.1 of the License. +// See the file LICENSE.LGPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Installation/config/support/test_GMP.cpp $ +// $Id: test_GMP.cpp 32424 2006-07-12 09:26:22Z spion $ +// +// +// Author(s) : various + +// Tests if GMP is available. + +#include +#include "gmp.h" + +int main() +{ + std::cout << "version=" << __GNU_MP_VERSION << "." + << __GNU_MP_VERSION_MINOR << "." + << __GNU_MP_VERSION_PATCHLEVEL << std::endl; + + return 0; +} diff --git a/CMake/config/support/print_MPFR_version.cpp b/CMake/config/support/print_MPFR_version.cpp new file mode 100644 index 00000000000..71f83a2308b --- /dev/null +++ b/CMake/config/support/print_MPFR_version.cpp @@ -0,0 +1,41 @@ +// Copyright (c) 2005 Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany), +// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg +// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria), +// and Tel-Aviv University (Israel). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; version 2.1 of the License. +// See the file LICENSE.LGPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Installation/config/support/test_MPFR.cpp $ +// $Id: test_MPFR.cpp 32424 2006-07-12 09:26:22Z spion $ +// +// +// Author(s) : various + +// Tests if MPFR is available. + +#include +#include "mpfr.h" + +int main() +{ +#ifdef MPFR_VERSION + std::cout << "version=" << MPFR_VERSION_MAJOR << "." + << MPFR_VERSION_MINOR << "." + << MPFR_VERSION_PATCHLEVEL << std::endl; +#else + // MPFR versions < 2.2.0 did not have version strings + std::cout << "version=unknown" << std::endl; +#endif + + return 0; +} diff --git a/CMake/config/support/print_OPENGL_version.cpp b/CMake/config/support/print_OPENGL_version.cpp new file mode 100644 index 00000000000..b78df9f30b4 --- /dev/null +++ b/CMake/config/support/print_OPENGL_version.cpp @@ -0,0 +1,60 @@ +// Copyright (c) 2006 Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany), +// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg +// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria), +// and Tel-Aviv University (Israel). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; version 2.1 of the License. +// See the file LICENSE.LGPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Installation/config/support/test_OPENGL.cpp $ +// $Id: test_OPENGL.cpp 36141 2007-02-09 11:11:40Z afabri $ +// +// +// Author(s) : Sylvain Pion + +// Tests if OPEN GL and GLU are available. + +#if defined(_MSC_VER) +#include +#include +#endif + +#include +#include +#include + +int main() +{ + std::cout << "version=" << +#if defined GL_VERSION_2_1 + "2.1" +#elif defined GL_VERSION_2_0 + "2.0" +#elif defined GL_VERSION_1_5 + "1.5" +#elif defined GL_VERSION_1_4 + "1.4" +#elif defined GL_VERSION_1_3 + "1.3" +#elif defined GL_VERSION_1_2 + "1.2" +#elif defined GL_VERSION_1_1 + "1.1" +#elif defined GL_VERSION_1_0 + "1.0" +#else + "unknown" +#endif + << std::endl; + + return 0; +} diff --git a/CMake/config/support/print_QT_version.cpp b/CMake/config/support/print_QT_version.cpp new file mode 100644 index 00000000000..1bf9aaea834 --- /dev/null +++ b/CMake/config/support/print_QT_version.cpp @@ -0,0 +1,34 @@ +// Copyright (c) 2004 Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany), +// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg +// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria), +// and Tel-Aviv University (Israel). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; version 2.1 of the License. +// See the file LICENSE.LGPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Installation/config/support/test_QT.cpp $ +// $Id: test_QT.cpp 32424 2006-07-12 09:26:22Z spion $ +// +// +// Author(s) : various + +// Tests if QT is available. + +#include +#include + +int main() +{ + std::cout << "version=" << QT_VERSION_STR << std::endl; + + return 0; +} diff --git a/CMake/config/support/print_TAUCS_version.cpp b/CMake/config/support/print_TAUCS_version.cpp new file mode 100644 index 00000000000..1fb594386a2 --- /dev/null +++ b/CMake/config/support/print_TAUCS_version.cpp @@ -0,0 +1,36 @@ +// Copyright (c) 2004 Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany), +// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg +// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria), +// and Tel-Aviv University (Israel). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; version 2.1 of the License. +// See the file LICENSE.LGPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Installation/config/support/test_TAUCS.cpp $ +// $Id: test_TAUCS.cpp 41686 2008-01-18 20:33:57Z spion $ +// +// Author(s) : Laurent Saboret + +// Test if TAUCS is available + + +#include + + +int main(int argc, char* argv[]) +{ + // TAUCS provides no version number :-( + // Version 1 is obsolete, thus we assume version 2 (latest is 2.2 on 03/2006) + std::cout << "version=2.x" << std::endl; + + return 0; +} diff --git a/CMake/config/support/print_ZLIB_version.cpp b/CMake/config/support/print_ZLIB_version.cpp new file mode 100644 index 00000000000..b6bbe19be07 --- /dev/null +++ b/CMake/config/support/print_ZLIB_version.cpp @@ -0,0 +1,33 @@ +// Copyright (c) 2005 Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany), +// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg +// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria), +// and Tel-Aviv University (Israel). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; version 2.1 of the License. +// See the file LICENSE.LGPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Installation/config/support/test_ZLIB.cpp $ +// $Id: test_ZLIB.cpp 32424 2006-07-12 09:26:22Z spion $ +// +// +// Author(s) : Andreas Fabri, Laurent Saboret + +// Test if ZLIB is available. + +#include +#include + +int main() +{ + std::cout << "version=" << zlibVersion() << std::endl; + return 0; +}