mirror of https://github.com/CGAL/cgal
Last minute big change: make GMP/MPFR an optional dependency.
Locally tested. Just after that commit, I will create a fake release and trigger a test suite with that modification.
This commit is contained in:
parent
578d650272
commit
642bde884e
|
|
@ -1675,7 +1675,6 @@ Installation/cmake/modules/CGAL_SetupFlags.cmake -text
|
|||
Installation/cmake/modules/CGAL_SetupGMP.cmake -text
|
||||
Installation/cmake/modules/CGAL_SetupGMPXX.cmake -text
|
||||
Installation/cmake/modules/CGAL_SetupLEDA.cmake -text
|
||||
Installation/cmake/modules/CGAL_SetupMPFR.cmake -text
|
||||
Installation/cmake/modules/CGAL_UseBLAS.cmake -text
|
||||
Installation/cmake/modules/CGAL_UseLAPACK.cmake -text
|
||||
Installation/cmake/modules/CGAL_UseTAUCS.cmake -text
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
include(CGAL_SetupGMPXX)
|
||||
include(CGAL_SetupMPFR)
|
||||
include(CGAL_SetupGMP)
|
||||
option( WITH_GMP "Use the GMP number types if available." ON )
|
||||
|
||||
option ( WITH_LEDA "Use the LEDA number types" ON )
|
||||
if ( WITH_GMP )
|
||||
include(CGAL_SetupGMPXX)
|
||||
include(CGAL_SetupGMP)
|
||||
endif( WITH_GMP )
|
||||
|
||||
option ( WITH_LEDA "Use the LEDA number types if available." ON )
|
||||
if ( WITH_LEDA )
|
||||
include(CGAL_SetupLEDA)
|
||||
endif()
|
||||
endif( WITH_LEDA )
|
||||
|
||||
include(CGAL_SetupBoost)
|
||||
|
||||
if ( MSVC )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES "psapi.lib" )
|
||||
endif()
|
||||
|
||||
endif( MSVC )
|
||||
|
|
|
|||
|
|
@ -1,26 +1,48 @@
|
|||
if ( NOT CGAL_GMP_SETUP )
|
||||
|
||||
find_package( GMP REQUIRED )
|
||||
|
||||
message( STATUS "GMP include: ${GMP_INCLUDE_DIR}" )
|
||||
message( STATUS "GMP libraries: ${GMP_LIBRARIES}" )
|
||||
message( STATUS "GMP definitions: ${GMP_DEFINITIONS}" )
|
||||
|
||||
set ( CGAL_USE_GMP 1 )
|
||||
|
||||
include(CGAL_Macros)
|
||||
|
||||
get_dependency_version(GMP)
|
||||
|
||||
add_to_cached_list(CGAL_3RD_PARTY_INCLUDE_DIRS ${GMP_INCLUDE_DIR} )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES_DIRS ${GMP_LIBRARIES_DIR} )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_DEFINITIONS ${GMP_DEFINITIONS} )
|
||||
|
||||
if ( NOT MSVC )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES ${GMP_LIBRARIES} )
|
||||
endif()
|
||||
find_package( GMP )
|
||||
find_package( MPFR )
|
||||
|
||||
if( GMP_FOUND )
|
||||
if( MPFR_FOUND )
|
||||
|
||||
include(CGAL_Macros)
|
||||
|
||||
message( STATUS "GMP include: ${GMP_INCLUDE_DIR}" )
|
||||
message( STATUS "GMP libraries: ${GMP_LIBRARIES}" )
|
||||
message( STATUS "GMP definitions: ${GMP_DEFINITIONS}" )
|
||||
get_dependency_version(GMP)
|
||||
|
||||
message( STATUS "MPFR include: ${MPFR_INCLUDE_DIR}" )
|
||||
message( STATUS "MPFR libraries: ${MPFR_LIBRARIES}" )
|
||||
message( STATUS "MPFR definitions: ${MPFR_DEFINITIONS}" )
|
||||
set( MPFR_DEPENDENCY_INCLUDE_DIR ${GMP_INCLUDE_DIR} )
|
||||
get_dependency_version(MPFR)
|
||||
|
||||
set ( CGAL_USE_GMP 1 )
|
||||
set ( CGAL_USE_MPFR 1 )
|
||||
|
||||
add_to_cached_list(CGAL_3RD_PARTY_INCLUDE_DIRS ${MPFR_INCLUDE_DIR} )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES_DIRS ${MPFR_LIBRARIES_DIR} )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_DEFINITIONS ${MPFR_DEFINITIONS} )
|
||||
|
||||
add_to_cached_list(CGAL_3RD_PARTY_INCLUDE_DIRS ${GMP_INCLUDE_DIR} )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES_DIRS ${GMP_LIBRARIES_DIR} )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_DEFINITIONS ${GMP_DEFINITIONS} )
|
||||
|
||||
if ( NOT MSVC )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES ${MPFR_LIBRARIES} )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES ${GMP_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
else( MPFR_FOUND )
|
||||
|
||||
message("CGAL GMP support needs MPFR. GMP will not be supported.")
|
||||
|
||||
endif( MPFR_FOUND )
|
||||
|
||||
endif( GMP_FOUND)
|
||||
|
||||
set( CGAL_GMP_SETUP TRUE )
|
||||
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
if ( NOT CGAL_MPFR_SETUP )
|
||||
|
||||
find_package( GMP REQUIRED )
|
||||
find_package( MPFR REQUIRED )
|
||||
|
||||
message( STATUS "MPFR include: ${MPFR_INCLUDE_DIR}" )
|
||||
message( STATUS "MPFR libraries: ${MPFR_LIBRARIES}" )
|
||||
message( STATUS "MPFR definitions: ${MPFR_DEFINITIONS}" )
|
||||
|
||||
include(CGAL_Macros)
|
||||
|
||||
set ( CGAL_USE_MPFR 1 )
|
||||
|
||||
set( MPFR_DEPENDENCY_INCLUDE_DIR ${GMP_INCLUDE_DIR} )
|
||||
get_dependency_version(MPFR)
|
||||
|
||||
add_to_cached_list(CGAL_3RD_PARTY_INCLUDE_DIRS ${MPFR_INCLUDE_DIR} )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES_DIRS ${MPFR_LIBRARIES_DIR} )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_DEFINITIONS ${MPFR_DEFINITIONS} )
|
||||
|
||||
if ( NOT MSVC )
|
||||
add_to_cached_list(CGAL_3RD_PARTY_LIBRARIES ${MPFR_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
set( CGAL_MPFR_SETUP TRUE )
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
|
|
@ -40,5 +40,5 @@ if(NOT USE_CGAL_FILE_INCLUDED)
|
|||
|
||||
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
|
||||
link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||
|
||||
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in New Issue