Merge pull request #2910 from luis4a0/Algebraic_kernel_d-RS_MPFR_compatibility-Luis

Algebraic kernel d RS-Fix compatibility of MPFR, MPFI and RS.
This commit is contained in:
Laurent Rineau 2018-03-09 18:38:58 +01:00
commit cb9f03a93f
2 changed files with 30 additions and 8 deletions

View File

@ -35,7 +35,7 @@
#define CGALRS_PTR(a) void *a
#endif
// RS3 does not work with MPFR 3.1.3 to 3.1.5. In case RS3 is enabled and
// RS3 does not work with MPFR 3.1.3 to 3.1.6. In case RS3 is enabled and
// the version of MPFR is one of those buggy versions, abort the compilation
// and instruct the user to update MPFR or don't use RS3.
#ifdef CGAL_USE_RS3
@ -43,8 +43,8 @@
BOOST_STATIC_ASSERT_MSG(
MPFR_VERSION_MAJOR!=3 ||
MPFR_VERSION_MINOR!=1 ||
MPFR_VERSION_PATCHLEVEL<3 || MPFR_VERSION_PATCHLEVEL>5,
"RS3 does not work with MPFR versions 3.1.3 to 3.1.5. "#
MPFR_VERSION_PATCHLEVEL<3 || MPFR_VERSION_PATCHLEVEL>6,
"RS3 does not work with MPFR versions 3.1.3 to 3.1.6. "
"Please update MPFR or disable RS3.");
#endif // CGAL_USE_RS3

View File

@ -1,6 +1,6 @@
find_package( GMP QUIET )
if( GMP_FOUND )
if( GMP_FOUND AND MPFR_FOUND )
if( MPFI_INCLUDE_DIR AND MPFI_LIBRARIES )
set( MPFI_FOUND TRUE )
@ -32,14 +32,36 @@ if( GMP_FOUND )
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MPFI "DEFAULT_MSG" MPFI_LIBRARIES MPFI_INCLUDE_DIR )
find_package_handle_standard_args( MPFI
"DEFAULT_MSG"
MPFI_LIBRARIES
MPFI_INCLUDE_DIR )
else( GMP_FOUND )
else( GMP_FOUND AND MPFR_FOUND )
message( STATUS "MPFI needs GMP and MPFR" )
endif( GMP_FOUND )
endif( GMP_FOUND AND MPFR_FOUND )
if( MPFI_FOUND )
set( MPFI_USE_FILE "CGAL_UseMPFI" )
get_dependency_version( MPFR )
IS_VERSION_LESS("${MPFR_VERSION}" "4.0.0" _MPFR_OLD)
get_dependency_version( MPFI )
IS_VERSION_LESS("${MPFI_VERSION}" "1.5.2" _MPFI_OLD)
if( ( _MPFR_OLD AND NOT _MPFI_OLD ) OR ( NOT _MPFR_OLD AND _MPFI_OLD ) )
message(
STATUS
"MPFI<1.5.2 requires MPFR<4.0.0; MPFI>=1.5.2 requires MPFR>=4.0.0" )
set( MPFI_FOUND FALSE )
else( ( _MPFR_OLD AND NOT _MPFI_OLD ) OR ( NOT _MPFR_OLD AND _MPFI_OLD ) )
set( MPFI_USE_FILE "CGAL_UseMPFI" )
endif( ( _MPFR_OLD AND NOT _MPFI_OLD ) OR ( NOT _MPFR_OLD AND _MPFI_OLD ) )
endif( MPFI_FOUND )