From 4f4fef6c14afa8371d9273b7161c78213bfcd6f6 Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Mon, 13 Jun 2022 16:40:09 +0200 Subject: Move new option in the correct file. Disable every option when only build cpp documentation --- src/cmake/modules/GUDHI_options.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/cmake') diff --git a/src/cmake/modules/GUDHI_options.cmake b/src/cmake/modules/GUDHI_options.cmake index bffb3ffc..6655d605 100644 --- a/src/cmake/modules/GUDHI_options.cmake +++ b/src/cmake/modules/GUDHI_options.cmake @@ -3,3 +3,12 @@ option(WITH_GUDHI_EXAMPLE "Activate/deactivate examples compilation and installa option(WITH_GUDHI_PYTHON "Activate/deactivate python module compilation and installation" ON) option(WITH_GUDHI_TEST "Activate/deactivate examples compilation and installation" ON) option(WITH_GUDHI_UTILITIES "Activate/deactivate utilities compilation and installation" ON) +option(WITH_GUDHI_CPP_DOCUMENTATION_ONLY "Build only the GUDHI C++ documentation (with doxygen)." OFF) + +if (WITH_GUDHI_CPP_DOCUMENTATION_ONLY) + set (WITH_GUDHI_BENCHMARK OFF) + set (WITH_GUDHI_EXAMPLE OFF) + set (WITH_GUDHI_PYTHON OFF) + set (WITH_GUDHI_TEST OFF) + set (WITH_GUDHI_UTILITIES OFF) +endif() \ No newline at end of file -- cgit v1.2.3 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 (limited to 'src/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 From 17f68bb5be7a68fab17510740d2bdc28b70decea Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Thu, 30 Jun 2022 11:30:12 +0200 Subject: code review: rename option WITH_GUDHI_THIRD_PARTY --- .circleci/config.yml | 8 ++++---- .github/for_maintainers/tests_strategy.md | 5 +++++ CMakeLists.txt | 4 ++-- src/CMakeLists.txt | 4 ++-- src/cmake/modules/GUDHI_options.cmake | 4 ++-- src/common/doc/installation.h | 4 ++-- 6 files changed, 17 insertions(+), 12 deletions(-) (limited to 'src/cmake') diff --git a/.circleci/config.yml b/.circleci/config.yml index 64e7fbb1..82ad19db 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,7 +58,7 @@ jobs: git submodule update mkdir build cd build - cmake -DWITH_GUDHI_CPP_DOCUMENTATION_ONLY=ON -DUSER_VERSION_DIR=version .. + cmake -DWITH_GUDHI_THIRD_PARTY=OFF -DUSER_VERSION_DIR=version .. make user_version cd version cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=ON -DPython_ADDITIONAL_VERSIONS=3 . @@ -89,13 +89,13 @@ jobs: git submodule update mkdir build cd build - cmake -DWITH_GUDHI_CPP_DOCUMENTATION_ONLY=ON -DUSER_VERSION_DIR=version .. + cmake -DWITH_GUDHI_THIRD_PARTY=OFF -DUSER_VERSION_DIR=version .. make user_version cd version mkdir build cd build - cmake -DWITH_GUDHI_CPP_DOCUMENTATION_ONLY=ON .. - make doxygen 2>&1 + cmake -DWITH_GUDHI_THIRD_PARTY=OFF .. + make doxygen grep warning doxygen.log cp doxygen.log html/ cp -R html /tmp/doxygen diff --git a/.github/for_maintainers/tests_strategy.md b/.github/for_maintainers/tests_strategy.md index c25acf9b..01248d3a 100644 --- a/.github/for_maintainers/tests_strategy.md +++ b/.github/for_maintainers/tests_strategy.md @@ -4,6 +4,11 @@ This document tries to sum up the tests strategy that has been put in place for The aim is to help maintainers to anticipate third parties modifications, updates. +## CMake options + +[CMake GUDHI options](../../src/cmake/modules/GUDHI_options.cmake) allows to activate/deactivate what should be built and tested. +Note the special option `WITH_GUDHI_THIRD_PARTY` that, when set to `OFF`, accelerates doxygen documentation generation or `user_version` for instance. + ## Builds ### Linux diff --git a/CMakeLists.txt b/CMakeLists.txt index 1164eaab..6c233459 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ set(GUDHI_PYTHON_PATH "src/python") include(GUDHI_submodules) -if (NOT WITH_GUDHI_CPP_DOCUMENTATION_ONLY) +if (WITH_GUDHI_THIRD_PARTY) # For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH include(GUDHI_third_party_libraries NO_POLICY_SCOPE) endif() @@ -56,7 +56,7 @@ foreach(GUDHI_MODULE ${GUDHI_MODULES}) endforeach() endforeach() -if (NOT WITH_GUDHI_CPP_DOCUMENTATION_ONLY) +if (WITH_GUDHI_THIRD_PARTY) add_subdirectory(src/GudhUI) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d2f12e5f..f9f77ef7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,7 +14,7 @@ set(GUDHI_PYTHON_PATH "python") include(GUDHI_submodules) -if (NOT WITH_GUDHI_CPP_DOCUMENTATION_ONLY) +if (WITH_GUDHI_THIRD_PARTY) # For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH include(GUDHI_third_party_libraries NO_POLICY_SCOPE) endif() @@ -71,7 +71,7 @@ foreach(GUDHI_MODULE ${GUDHI_MODULES}) endforeach() endforeach() -if (NOT WITH_GUDHI_CPP_DOCUMENTATION_ONLY) +if (WITH_GUDHI_THIRD_PARTY) add_subdirectory(GudhUI) endif() diff --git a/src/cmake/modules/GUDHI_options.cmake b/src/cmake/modules/GUDHI_options.cmake index 6655d605..fe328169 100644 --- a/src/cmake/modules/GUDHI_options.cmake +++ b/src/cmake/modules/GUDHI_options.cmake @@ -3,9 +3,9 @@ option(WITH_GUDHI_EXAMPLE "Activate/deactivate examples compilation and installa option(WITH_GUDHI_PYTHON "Activate/deactivate python module compilation and installation" ON) option(WITH_GUDHI_TEST "Activate/deactivate examples compilation and installation" ON) option(WITH_GUDHI_UTILITIES "Activate/deactivate utilities compilation and installation" ON) -option(WITH_GUDHI_CPP_DOCUMENTATION_ONLY "Build only the GUDHI C++ documentation (with doxygen)." OFF) +option(WITH_GUDHI_THIRD_PARTY "Activate/deactivate third party libraries cmake detection. When set to OFF, it is usefull for doxygen or user_version i.e." ON) -if (WITH_GUDHI_CPP_DOCUMENTATION_ONLY) +if (NOT WITH_GUDHI_THIRD_PARTY) set (WITH_GUDHI_BENCHMARK OFF) set (WITH_GUDHI_EXAMPLE OFF) set (WITH_GUDHI_PYTHON OFF) diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h index b97142b6..c17855b6 100644 --- a/src/common/doc/installation.h +++ b/src/common/doc/installation.h @@ -43,13 +43,13 @@ make \endverbatim * * \subsection documentationgeneration C++ documentation * To generate the C++ documentation, the doxygen program - * is required. Run the following command in a terminal: + * is required (version ≥ 1.9.3 is advised). Run the following command in a terminal: * \verbatim make doxygen \endverbatim * Documentation will be generated in a folder named html. * * In case there is not a full setup present and only the documentation should be build the following command sequence * can be used: -\verbatim cmake -DWITH_GUDHI_CPP_DOCUMENTATION_ONLY=ON .. +\verbatim cmake -DWITH_GUDHI_THIRD_PARTY=OFF .. make doxygen\endverbatim * * \subsection helloworld Hello world ! -- cgit v1.2.3