mirror of https://github.com/CGAL/cgal
Fix MPFR/MPFI check when MPFI is not present.
This commit is contained in:
parent
6200edcfaf
commit
a8c8d6f152
|
|
@ -22,22 +22,6 @@ if( GMP_FOUND AND MPFR_FOUND )
|
||||||
DOC "Directory containing the MPFI library"
|
DOC "Directory containing the MPFI library"
|
||||||
)
|
)
|
||||||
|
|
||||||
get_dependency_version( MPFR )
|
|
||||||
message( STATUS "MPFR version is ${MPFR_VERSION}." )
|
|
||||||
IS_VERSION_LESS("${MPFR_VERSION}" "4.0.0" _MPFR_OLD)
|
|
||||||
|
|
||||||
get_dependency_version( MPFI )
|
|
||||||
message( STATUS "MPFI version is ${MPFI_VERSION}." )
|
|
||||||
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 ) )
|
|
||||||
|
|
||||||
if( MPFI_LIBRARIES )
|
if( MPFI_LIBRARIES )
|
||||||
get_filename_component(MPFI_LIBRARIES_DIR ${MPFI_LIBRARIES} PATH CACHE )
|
get_filename_component(MPFI_LIBRARIES_DIR ${MPFI_LIBRARIES} PATH CACHE )
|
||||||
endif( MPFI_LIBRARIES )
|
endif( MPFI_LIBRARIES )
|
||||||
|
|
@ -53,8 +37,6 @@ if( GMP_FOUND AND MPFR_FOUND )
|
||||||
MPFI_LIBRARIES
|
MPFI_LIBRARIES
|
||||||
MPFI_INCLUDE_DIR )
|
MPFI_INCLUDE_DIR )
|
||||||
|
|
||||||
endif( ( _MPFR_OLD AND NOT _MPFI_OLD ) OR ( NOT _MPFR_OLD AND _MPFI_OLD ) )
|
|
||||||
|
|
||||||
else( GMP_FOUND AND MPFR_FOUND )
|
else( GMP_FOUND AND MPFR_FOUND )
|
||||||
|
|
||||||
message( STATUS "MPFI needs GMP and MPFR" )
|
message( STATUS "MPFI needs GMP and MPFR" )
|
||||||
|
|
@ -62,5 +44,24 @@ else( GMP_FOUND AND MPFR_FOUND )
|
||||||
endif( GMP_FOUND AND MPFR_FOUND )
|
endif( GMP_FOUND AND MPFR_FOUND )
|
||||||
|
|
||||||
if( MPFI_FOUND )
|
if( MPFI_FOUND )
|
||||||
|
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" )
|
set( MPFI_USE_FILE "CGAL_UseMPFI" )
|
||||||
|
|
||||||
|
endif( ( _MPFR_OLD AND NOT _MPFI_OLD ) OR ( NOT _MPFR_OLD AND _MPFI_OLD ) )
|
||||||
|
|
||||||
endif( MPFI_FOUND )
|
endif( MPFI_FOUND )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue