From ec092c0833d3590a9e1e185c04db3f6fd3e82e5e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 25 Jan 2010 10:54:53 +0000 Subject: [PATCH] Merged revisions 53757,53759-53760 via svnmerge from svn+ssh://lrineau@scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.6-branch ........ r53757 | lrineau | 2010-01-25 11:03:44 +0100 (Mon, 25 Jan 2010) | 2 lines Add GMP and MPFR version to CGALConfig.cmake ........ r53759 | lrineau | 2010-01-25 11:24:16 +0100 (Mon, 25 Jan 2010) | 2 lines GMP >= 4.2 is required. ........ r53760 | lrineau | 2010-01-25 11:36:06 +0100 (Mon, 25 Jan 2010) | 2 lines Check if the GMP version is >= 4.2. ........ --- .../Algebraic_kernel_d/CMakeLists.txt | 20 ++++++++++++------- .../cmake/modules/CGALConfig_binary.cmake.in | 2 ++ .../modules/CGALConfig_install.cmake.fhs.in | 2 ++ .../CGALConfig_install.cmake.source.in | 2 ++ .../doc_tex/Installation/installation.tex | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index 8f5037f7776..5234c70dd90 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -13,16 +13,22 @@ find_package( CGAL QUIET ) if ( CGAL_FOUND ) include( ${CGAL_USE_FILE} ) + include( CGAL_VersionUtils ) include( CGAL_CreateSingleSourceCGALProgram ) find_package( RS ) if( RS_FOUND ) - include( ${RS_USE_FILE} ) - include_directories( BEFORE ../../include ) - create_single_source_cgal_program( "Construct_algebraic_real_1.cpp" ) - create_single_source_cgal_program( "Solve_1.cpp" ) - create_single_source_cgal_program( "Compare_1.cpp" ) - create_single_source_cgal_program( "Isolate_1.cpp" ) - create_single_source_cgal_program( "Sign_at_1.cpp" ) + IS_VERSION_LESS("${CGAL_GMP_VERSION}" "4.2.0" _IS_GMP_VERSION_TO_LOW) + if(_IS_GMP_VERSION_TO_LOW) + message(STATUS "NOTICE: These program uses the CGAL Algebraic Kernel, and its implementation using RS needs GMP>=4.2. Your GMP version is ${CGAL_GMP_VERSION}.") + else() + include( ${RS_USE_FILE} ) + include_directories( BEFORE ../../include ) + create_single_source_cgal_program( "Construct_algebraic_real_1.cpp" ) + create_single_source_cgal_program( "Solve_1.cpp" ) + create_single_source_cgal_program( "Compare_1.cpp" ) + create_single_source_cgal_program( "Isolate_1.cpp" ) + create_single_source_cgal_program( "Sign_at_1.cpp" ) + endif() else( RS_FOUND ) message(STATUS "NOTICE: This program requires RS and will not be compiled.") endif( RS_FOUND ) diff --git a/Installation/cmake/modules/CGALConfig_binary.cmake.in b/Installation/cmake/modules/CGALConfig_binary.cmake.in index 3d64e7ce2d7..f93be2faaa0 100644 --- a/Installation/cmake/modules/CGALConfig_binary.cmake.in +++ b/Installation/cmake/modules/CGALConfig_binary.cmake.in @@ -78,6 +78,8 @@ set(CGAL_Qt4_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt4_3RD_PARTY_LIBRARIES_DIRS@" ) set(CGAL_Qt4_3RD_PARTY_LIBRARIES "@CGAL_Qt4_3RD_PARTY_LIBRARIES@" ) set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUILD_VERSION}") +set(CGAL_GMP_VERSION "@GMP_VERSION@") +set(CGAL_MPFR_VERSION "@MPFR_VERSION@") set(CGAL_USE_FILE "${CGAL_CMAKE_MODULE_PATH}/UseCGAL.cmake" ) diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.fhs.in b/Installation/cmake/modules/CGALConfig_install.cmake.fhs.in index 4a993539d5d..e3ee5e43ec8 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.fhs.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.fhs.in @@ -80,6 +80,8 @@ set(CGAL_Qt4_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt4_3RD_PARTY_LIBRARIES_DIRS@" ) set(CGAL_Qt4_3RD_PARTY_LIBRARIES "@CGAL_Qt4_3RD_PARTY_LIBRARIES@" ) set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUILD_VERSION}") +set(CGAL_GMP_VERSION "@GMP_VERSION@") +set(CGAL_MPFR_VERSION "@MPFR_VERSION@") set(CGAL_USE_FILE "${CGAL_CMAKE_MODULE_PATH}/UseCGAL.cmake" ) diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.source.in b/Installation/cmake/modules/CGALConfig_install.cmake.source.in index b642e7e48e5..3afb0f9a150 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.source.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.source.in @@ -78,6 +78,8 @@ set(CGAL_Qt4_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt4_3RD_PARTY_LIBRARIES_DIRS@" ) set(CGAL_Qt4_3RD_PARTY_LIBRARIES "@CGAL_Qt4_3RD_PARTY_LIBRARIES@" ) set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUILD_VERSION}") +set(CGAL_GMP_VERSION "@GMP_VERSION@") +set(CGAL_MPFR_VERSION "@MPFR_VERSION@") set(CGAL_USE_FILE "${CGAL_CMAKE_MODULE_PATH}/UseCGAL.cmake" ) diff --git a/Installation/doc_tex/Installation/installation.tex b/Installation/doc_tex/Installation/installation.tex index 8fa93ff39cc..d3f63b5b125 100644 --- a/Installation/doc_tex/Installation/installation.tex +++ b/Installation/doc_tex/Installation/installation.tex @@ -157,7 +157,7 @@ in order to be efficient and reliable. \cgal\ offers support for exact number type used when none of the above is installed on your system. -Having \gmp\ version 4.1.4 or higher and \mpfr\ version 2.2.1 or higher +Having \gmp\ version 4.2 or higher and \mpfr\ version 2.2.1 or higher installed is highly recommended. These libraries can be obtained from \gmppage\ and \mpfrpage, respectively. As Visual \CC\ is not properly support by the \gmp\ and \mpfr\ projects, we provide precompiled versions