mirror of https://github.com/CGAL/cgal
Don't generate a CMake error if GMP has not been found
This commit is contained in:
parent
25d7076791
commit
d8e17c22c5
|
|
@ -21,9 +21,18 @@ set(CGAL_SetupGMP_included TRUE)
|
|||
# That is required to find the FindGMP and FindMPFR modules.
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CGAL_MODULES_DIR})
|
||||
|
||||
find_package(GMP REQUIRED)
|
||||
find_package(MPFR REQUIRED)
|
||||
find_package(GMPXX QUIET)
|
||||
find_package(GMP QUIET)
|
||||
find_package(MPFR QUIET)
|
||||
|
||||
if (GMP_FOUND)
|
||||
find_package(GMPXX QUIET)
|
||||
endif()
|
||||
|
||||
if(NOT GMP_FOUND OR NOT MPFR_FOUND)
|
||||
message(STATUS "GMP not found.")
|
||||
set(CGAL_DISABLE_GMP ON)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT GMPXX_FOUND)
|
||||
option(CGAL_WITH_GMPXX "Use CGAL with GMPXX: use C++ classes of GNU MP instead of CGAL wrappers" OFF)
|
||||
|
|
|
|||
Loading…
Reference in New Issue