From acbe714a140516c0bc0b02f4ac58b9609c9ff5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 20 Feb 2023 13:56:21 +0100 Subject: [PATCH] update rules for using/finding core --- Installation/CMakeLists.txt | 2 +- .../modules/CGAL_SetupCGAL_CoreDependencies.cmake | 14 ++++---------- .../cmake/modules/CGAL_SetupDependencies.cmake | 13 ------------- .../internal/enable_third_party_libraries.h | 6 ------ 4 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 Installation/cmake/modules/CGAL_SetupDependencies.cmake diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 8d48e93b39f..e028db7e38f 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -941,7 +941,7 @@ if(CGAL_BRANCH_BUILD) set(compile_options "\ -${CMAKE_CXX_FLAGS} -DCGAL_EIGEN3_ENABLED -DCGAL_PROFILE \ +${CMAKE_CXX_FLAGS} -DCGAL_EIGEN3_ENABLED -DCGAL_PROFILE -DCGAL_USE_CORE \ ${Qt5Widgets_DEFINITIONS} ${Qt5OpenGL_DEFINITIONS} ${Qt5Gui_DEFINITIONS} \ ${Qt5OpenGL_EXECUTABLE_COMPILE_FLAGS} -fPIC \ ${Qt5Gui_EXECUTABLE_COMPILE_FLAGS} \ diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake index 0b1eee31681..44be800f9c0 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake @@ -18,9 +18,6 @@ endif() set(CGAL_SetupCGAL_CoreDependencies_included TRUE) #.rst: -# Used Modules -# ^^^^^^^^^^^^ -# - :module:`CGAL_SetupGMP` # # Result Variables # ^^^^^^^^^^^^^^^^ @@ -29,13 +26,10 @@ set(CGAL_SetupCGAL_CoreDependencies_included TRUE) # # Set to `TRUE` if the dependencies of `CGAL_Core` were found. -if(NOT CGAL_DISABLE_GMP) - include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupGMP.cmake) - if(GMP_FOUND) - set(CGAL_Core_FOUND TRUE) - set_property(GLOBAL PROPERTY CGAL_Core_FOUND TRUE) - endif() -endif() + +# always found as it requires the minimal version of boost required by CGAL +set(CGAL_Core_FOUND TRUE) +set_property(GLOBAL PROPERTY CGAL_Core_FOUND TRUE) #.rst: # diff --git a/Installation/cmake/modules/CGAL_SetupDependencies.cmake b/Installation/cmake/modules/CGAL_SetupDependencies.cmake deleted file mode 100644 index 6051c7d3ce4..00000000000 --- a/Installation/cmake/modules/CGAL_SetupDependencies.cmake +++ /dev/null @@ -1,13 +0,0 @@ -include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake) - -if( (GMP_FOUND AND NOT MPFR_FOUND) OR (NOT GMP_FOUND AND MPFR_FOUND) ) - message( FATAL_ERROR "CGAL needs for its full functionality both GMP and MPFR.") -endif() - -if( NOT GMP_FOUND ) - set(CGAL_NO_CORE ON) - message( STATUS "CGAL_Core needs GMP, cannot be configured.") -endif( NOT GMP_FOUND ) - -# finally setup Boost -include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupBoost.cmake) diff --git a/Installation/include/CGAL/Installation/internal/enable_third_party_libraries.h b/Installation/include/CGAL/Installation/internal/enable_third_party_libraries.h index 2df627952a3..374a09b2633 100644 --- a/Installation/include/CGAL/Installation/internal/enable_third_party_libraries.h +++ b/Installation/include/CGAL/Installation/internal/enable_third_party_libraries.h @@ -27,18 +27,12 @@ #if defined(__has_include) && ( ! defined _MSC_VER || _MSC_VER > 1900) # if CGAL_USE_GMP && ! __has_include() -# pragma CGAL_WARNING(" cannot be found. Less efficient number types will be used instead. Define CGAL_NO_GMP=1 if that is on purpose.") # undef CGAL_USE_GMP # undef CGAL_USE_MPFR # elif CGAL_USE_MPFR && ! __has_include() -# pragma CGAL_WARNING(" cannot be found and the GMP support in CGAL requires it. Less efficient number types will be used instead. Define CGAL_NO_GMP=1 if that is on purpose.") # undef CGAL_USE_GMP # undef CGAL_USE_MPFR # endif // CGAL_USE_MPFR and no #endif // __has_include -#if CGAL_USE_GMP && CGAL_USE_MPFR && ! CGAL_NO_CORE -# define CGAL_USE_CORE 1 -#endif - #endif // CGAL_INTERNAL_ENABLE_THIRD_PARTY_LIBRARIES_H