From 26a4381c6948338f935e107880cdf0789f65cb12 Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Wed, 29 Jun 2022 10:03:38 +0200 Subject: third parties are not required when WITH_GUDHI_CPP_DOCUMENTATION_ONLY, but hera submodule is mandatory. Moved in a new cmake module --- CMakeLists.txt | 2 ++ src/CMakeLists.txt | 2 ++ src/cmake/modules/GUDHI_submodules.cmake | 5 +++++ src/cmake/modules/GUDHI_third_party_libraries.cmake | 6 ------ 4 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 src/cmake/modules/GUDHI_submodules.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index f946e111..1164eaab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,8 @@ set(GUDHI_MISSING_MODULES "" CACHE INTERNAL "GUDHI_MISSING_MODULES") # This variable is used by Cython CMakeLists.txt and by GUDHI_third_party_libraries to know its path set(GUDHI_PYTHON_PATH "src/python") +include(GUDHI_submodules) + if (NOT WITH_GUDHI_CPP_DOCUMENTATION_ONLY) # For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH include(GUDHI_third_party_libraries NO_POLICY_SCOPE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a4fcfcad..d2f12e5f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,6 +12,8 @@ set(GUDHI_MISSING_MODULES "" CACHE INTERNAL "GUDHI_MISSING_MODULES") # This variable is used by Cython CMakeLists.txt and by GUDHI_third_party_libraries to know its path set(GUDHI_PYTHON_PATH "python") +include(GUDHI_submodules) + if (NOT WITH_GUDHI_CPP_DOCUMENTATION_ONLY) # For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH include(GUDHI_third_party_libraries NO_POLICY_SCOPE) diff --git a/src/cmake/modules/GUDHI_submodules.cmake b/src/cmake/modules/GUDHI_submodules.cmake new file mode 100644 index 00000000..78b045bd --- /dev/null +++ b/src/cmake/modules/GUDHI_submodules.cmake @@ -0,0 +1,5 @@ +# For those who dislike bundled dependencies, this indicates where to find a preinstalled Hera. +set(HERA_WASSERSTEIN_INTERNAL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/ext/hera/wasserstein/include) +set(HERA_WASSERSTEIN_INCLUDE_DIR ${HERA_WASSERSTEIN_INTERNAL_INCLUDE_DIR} CACHE PATH "Directory where one can find Hera's wasserstein.h") +set(HERA_BOTTLENECK_INTERNAL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/ext/hera/bottleneck/include) +set(HERA_BOTTLENECK_INCLUDE_DIR ${HERA_BOTTLENECK_INTERNAL_INCLUDE_DIR} CACHE PATH "Directory where one can find Hera's bottleneck.h") \ No newline at end of file diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index 6ba822ad..2cf6787e 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -48,12 +48,6 @@ if(CGAL_FOUND) include( ${CGAL_USE_FILE} ) endif() -# For those who dislike bundled dependencies, this indicates where to find a preinstalled Hera. -set(HERA_WASSERSTEIN_INTERNAL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/ext/hera/wasserstein/include) -set(HERA_WASSERSTEIN_INCLUDE_DIR ${HERA_WASSERSTEIN_INTERNAL_INCLUDE_DIR} CACHE PATH "Directory where one can find Hera's wasserstein.h") -set(HERA_BOTTLENECK_INTERNAL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/ext/hera/bottleneck/include) -set(HERA_BOTTLENECK_INCLUDE_DIR ${HERA_BOTTLENECK_INTERNAL_INCLUDE_DIR} CACHE PATH "Directory where one can find Hera's bottleneck.h") - option(WITH_GUDHI_USE_TBB "Build with Intel TBB parallelization" ON) # Find TBB package for parallel sort - not mandatory, just optional. -- cgit v1.2.3