From 0b0f67cee1e3841804f5773df5210860931a38fe Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 18 May 2022 19:17:44 +0200 Subject: Documentation: make it easier to build only the documentation Introduce the possibility: ``` -Dbuild_documentation_only=ON ``` so that only the doxygen documentation can be build and we don't have to resort to installing all kinds of sub packages like Boost or manipulate the CMake files:w --- CMakeLists.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac877eea..bff6d74d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,6 @@ + +option(build_documentation_only "Build only the documentation with doxygen." OFF) + cmake_minimum_required(VERSION 3.5) project(GUDHIdev) @@ -13,8 +16,10 @@ 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") -# For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH -include(GUDHI_third_party_libraries NO_POLICY_SCOPE) +if (NOT build_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) +endif() include(GUDHI_compilation_flags) @@ -52,7 +57,9 @@ foreach(GUDHI_MODULE ${GUDHI_MODULES}) endforeach() endforeach() -add_subdirectory(src/GudhUI) +if (NOT build_documentation_only) + add_subdirectory(src/GudhUI) +endif() if (WITH_GUDHI_PYTHON) # specific for cython module -- cgit v1.2.3 From 7fff2e5e725ced71da812d9f0bede1c8e0666e2e Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 20 May 2022 12:07:56 +0200 Subject: Documentation: make it easier to build only the documentation After review: - option is now: ``` -DWITH_GUDHI_CPP_DOCUMENTATION_ONLY=ON ``` - added some instructions to the installation description. --- CMakeLists.txt | 6 +++--- src/common/doc/installation.h | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bff6d74d..47d87cd1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -option(build_documentation_only "Build only the documentation with doxygen." OFF) +option(WITH_GUDHI_CPP_DOCUMENTATION_ONLY "Build only the GUDHI C++ documentation (with doxygen)." OFF) cmake_minimum_required(VERSION 3.5) @@ -16,7 +16,7 @@ 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") -if (NOT build_documentation_only) +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) endif() @@ -57,7 +57,7 @@ foreach(GUDHI_MODULE ${GUDHI_MODULES}) endforeach() endforeach() -if (NOT build_documentation_only) +if (NOT WITH_GUDHI_CPP_DOCUMENTATION_ONLY) add_subdirectory(src/GudhUI) endif() diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h index 67d026bd..91043983 100644 --- a/src/common/doc/installation.h +++ b/src/common/doc/installation.h @@ -41,11 +41,16 @@ make \endverbatim * program). If some of the tests are failing, please send us the result of the following command: * \verbatim ctest --output-on-failure \endverbatim * - * \subsection documentationgeneration Documentation - * To generate the documentation, Doxygen is required. - * Run the following command in a terminal: + * \subsection documentationgeneration C++ documentation + * To generate the C++ documentation, for this the doxygen program + * is required, 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 .. +make doxygen\endverbatim * * \subsection helloworld Hello world ! * The Hello world for GUDHI -- cgit v1.2.3 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 --- CMakeLists.txt | 3 --- src/cmake/modules/GUDHI_options.cmake | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 47d87cd1..f946e111 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,3 @@ - -option(WITH_GUDHI_CPP_DOCUMENTATION_ONLY "Build only the GUDHI C++ documentation (with doxygen)." OFF) - cmake_minimum_required(VERSION 3.5) project(GUDHIdev) 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 8a0cae963c6b86cfb07da906af22bff7b55624db Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Mon, 13 Jun 2022 16:41:26 +0200 Subject: Use new option when only build cpp documentation - useful when performing user version also --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f6a875dd..3e99896a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,7 +48,7 @@ jobs: python: docker: - - image: gudhi/ci_for_gudhi:latest + - image: gudhi/doxygen_for_gudhi:latest steps: - checkout - run: @@ -58,7 +58,7 @@ jobs: git submodule update mkdir build cd build - cmake -DUSER_VERSION_DIR=version .. + cmake -DWITH_GUDHI_CPP_DOCUMENTATION_ONLY=ON -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,12 +89,12 @@ jobs: git submodule update mkdir build cd build - cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF -DUSER_VERSION_DIR=version .. + cmake -DWITH_GUDHI_CPP_DOCUMENTATION_ONLY=ON -DUSER_VERSION_DIR=version .. make user_version cd version mkdir build cd build - cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. + cmake -DWITH_GUDHI_CPP_DOCUMENTATION_ONLY=ON .. make doxygen 2>&1 | tee dox.log grep warning dox.log cp dox.log html/ -- cgit v1.2.3 From 87d153e2f8d4c2a59f380fc07862609f124dc70c Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Mon, 13 Jun 2022 16:42:11 +0200 Subject: Warns no more on standard output but in a file --- src/Doxyfile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Doxyfile.in b/src/Doxyfile.in index 06a74012..4af327c7 100644 --- a/src/Doxyfile.in +++ b/src/Doxyfile.in @@ -711,7 +711,7 @@ CITE_BIB_FILES = @CMAKE_SOURCE_DIR@/biblio/bibliography.bib \ # messages are off. # The default value is: NO. -QUIET = NO +QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES @@ -765,7 +765,7 @@ WARN_FORMAT = "$file:$line: $text" # messages should be written. If left blank the output is written to standard # error (stderr). -WARN_LOGFILE = +WARN_LOGFILE = doxygen.log #--------------------------------------------------------------------------- # Configuration options related to the input files -- cgit v1.2.3 From 7d5206157185a184303b8eda42e2f9a2b39bf7d4 Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Mon, 13 Jun 2022 16:42:47 +0200 Subject: Also apply the feature for user version also --- src/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8023e04c..a4fcfcad 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,8 +12,10 @@ 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") -# For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH -include(GUDHI_third_party_libraries NO_POLICY_SCOPE) +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) +endif() include(GUDHI_compilation_flags) @@ -67,7 +69,9 @@ foreach(GUDHI_MODULE ${GUDHI_MODULES}) endforeach() endforeach() -add_subdirectory(GudhUI) +if (NOT WITH_GUDHI_CPP_DOCUMENTATION_ONLY) + add_subdirectory(GudhUI) +endif() message("++ GUDHI_MODULES list is:\"${GUDHI_MODULES}\"") message("++ GUDHI_MISSING_MODULES list is:\"${GUDHI_MISSING_MODULES}\"") -- cgit v1.2.3 From 146da89aa32effe082333601b5141300717cd8c0 Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Mon, 13 Jun 2022 17:09:58 +0200 Subject: Update submodule gudhi-deploy to take into account last modification for a docker dedicated to doxygen --- ext/gudhi-deploy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/gudhi-deploy b/ext/gudhi-deploy index 290ade10..e9e9a487 160000 --- a/ext/gudhi-deploy +++ b/ext/gudhi-deploy @@ -1 +1 @@ -Subproject commit 290ade1086bedbc96a35df886cadecabbf4072e6 +Subproject commit e9e9a4878731853d2d3149a5eac30df338a8197a -- cgit v1.2.3 From c8dc6c9a247f1eb541cea90dfc6f9bfb3e0d576e Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Wed, 15 Jun 2022 08:35:25 +0200 Subject: Docker image mix between doxygen/python --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e99896a..e2997145 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,7 +48,7 @@ jobs: python: docker: - - image: gudhi/doxygen_for_gudhi:latest + - image: gudhi/ci_for_gudhi:latest steps: - checkout - run: @@ -79,7 +79,7 @@ jobs: doxygen: docker: - - image: gudhi/ci_for_gudhi:latest + - image: gudhi/doxygen_for_gudhi:latest steps: - checkout - run: -- cgit v1.2.3 From ccb0e44f107d1d09c178620566eeefd02feb6a4e Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Wed, 15 Jun 2022 08:35:58 +0200 Subject: doc review: no need 'for this' --- src/common/doc/installation.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h index 131130f8..b97142b6 100644 --- a/src/common/doc/installation.h +++ b/src/common/doc/installation.h @@ -42,8 +42,8 @@ make \endverbatim * \verbatim ctest --output-on-failure \endverbatim * * \subsection documentationgeneration C++ documentation - * To generate the C++ documentation, for this the doxygen program - * is required, run the following command in a terminal: + * To generate the C++ documentation, the doxygen program + * is required. Run the following command in a terminal: * \verbatim make doxygen \endverbatim * Documentation will be generated in a folder named html. * -- 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 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 e31556d04e4a957dd38b3e52e91e1a6cedd47f65 Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Wed, 29 Jun 2022 10:07:04 +0200 Subject: doxygen logs are now in doxygen.log file (cf. Doxyfile.in). grep and cp the correct file --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e2997145..64e7fbb1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,9 +95,9 @@ jobs: mkdir build cd build cmake -DWITH_GUDHI_CPP_DOCUMENTATION_ONLY=ON .. - make doxygen 2>&1 | tee dox.log - grep warning dox.log - cp dox.log html/ + make doxygen 2>&1 + grep warning doxygen.log + cp doxygen.log html/ cp -R html /tmp/doxygen - store_artifacts: -- 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(-) 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 From 70b9a1e3633ce3bc6112488ea6e0342ea910c772 Mon Sep 17 00:00:00 2001 From: Hind-M Date: Thu, 30 Jun 2022 16:43:47 +0200 Subject: Reuse vector of points and reserve to avoid reallocations --- src/Cech_complex/include/gudhi/Cech_complex_blocker.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h index 1bb205b3..fb452326 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h +++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h @@ -14,6 +14,8 @@ #include // for casting from FT to Filtration_value #include // for CGAL::exact +#include + #include #include #include @@ -73,6 +75,8 @@ class Cech_blocker { CGAL::NT_converter cast_to_fv; Filtration_value radius = 0; bool is_min_enclos_ball = false; + Point_cloud points; + points.reserve(boost::size(sc_ptr_->simplex_vertex_range(sh))); // for each face of simplex sh, test outsider point is indeed inside enclosing ball, if yes, take it and exit loop, otherwise, new sphere is circumsphere of all vertices for (auto face_opposite_vertex : sc_ptr_->boundary_opposite_vertex_simplex_range(sh)) { @@ -82,19 +86,18 @@ class Cech_blocker { sph = cc_ptr_->get_cache().at(k); } else { - Point_cloud face_points; for (auto vertex : sc_ptr_->simplex_vertex_range(face_opposite_vertex.first)) { - face_points.push_back(cc_ptr_->get_point(vertex)); + points.push_back(cc_ptr_->get_point(vertex)); #ifdef DEBUG_TRACES std::clog << "#(" << vertex << ")#"; #endif // DEBUG_TRACES } - sph = get_sphere(face_points.cbegin(), face_points.cend()); + sph = get_sphere(points.cbegin(), points.cend()); // Put edge sphere in cache sc_ptr_->assign_key(face_opposite_vertex.first, cc_ptr_->get_cache().size()); cc_ptr_->get_cache().push_back(sph); - // Clear face_points - face_points.clear(); + // Clear face points + points.clear(); } // Check if the minimal enclosing ball of current face contains the extra point/opposite vertex if (kernel_.squared_distance_d_object()(sph.first, cc_ptr_->get_point(face_opposite_vertex.second)) <= sph.second) { @@ -113,7 +116,6 @@ class Cech_blocker { } // Spheres of each face don't contain the whole simplex if(!is_min_enclos_ball) { - Point_cloud points; for (auto vertex : sc_ptr_->simplex_vertex_range(sh)) { points.push_back(cc_ptr_->get_point(vertex)); } -- cgit v1.2.3 From 438f168ea992125382f8c23eb2cd9ad3e92688a7 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 1 Jul 2022 11:09:45 +0200 Subject: Don't reveal full path in the documentation but just the relative path In e,g, https://gudhi.inria.fr/doc/latest/struct_coefficient_field.html (in general in `../struct_coefficient_field.html`) we see lines like: ``` #include ``` and ``` The documentation for this struct was generated from the following file: /home/gailuron/workspace/gudhi/gudhi-devel/build/gudhi.3.5.0/concept/Persistent_cohomology/CoefficientField.h ``` instead of the relative names: ``` #include ``` and ``` The documentation for this struct was generated from the following file: src/Persistent_cohomology/concept/CoefficientField.h ``` (the links are pointing to the correct places in all cases.) This is corrected by stripping the path. --- src/Doxyfile.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Doxyfile.in b/src/Doxyfile.in index fb68ceb1..ad4e95ca 100644 --- a/src/Doxyfile.in +++ b/src/Doxyfile.in @@ -152,7 +152,7 @@ FULL_PATH_NAMES = YES # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -162,7 +162,8 @@ STRIP_FROM_PATH = # using the -I flag. STRIP_FROM_INC_PATH = include \ - concept + concept \ + @CMAKE_SOURCE_DIR@ # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't -- cgit v1.2.3 From 3f05f2c81481c9a14357d8674378244a27aaec56 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 1 Jul 2022 15:40:31 +0200 Subject: Ignore complete current build directory when building documentation Found the file ``` build/CMakeFiles/ShowIncludes/foo.h ``` during the build of the documentation. The build directory should be excluded. --- src/Doxyfile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Doxyfile.in b/src/Doxyfile.in index fb68ceb1..c20dffeb 100644 --- a/src/Doxyfile.in +++ b/src/Doxyfile.in @@ -832,7 +832,7 @@ EXCLUDE = @CMAKE_SOURCE_DIR@/data/ \ @CMAKE_SOURCE_DIR@/ext/ \ @CMAKE_SOURCE_DIR@/README.md \ @CMAKE_SOURCE_DIR@/.github \ - @CMAKE_CURRENT_BINARY_DIR@/new_gudhi_version_creation.md \ + @CMAKE_CURRENT_BINARY_DIR@ \ @GUDHI_DOXYGEN_SOURCE_PREFIX@/GudhUI/ \ @GUDHI_DOXYGEN_SOURCE_PREFIX@/cmake/ \ @GUDHI_DOXYGEN_SOURCE_PREFIX@/python/ -- cgit v1.2.3 From dd41000ec13553787c8575f7aa55ce9156ad6b8a Mon Sep 17 00:00:00 2001 From: Hind-M Date: Fri, 1 Jul 2022 15:42:29 +0200 Subject: Use dimension to get range size to reserve vector in cech --- src/Cech_complex/include/gudhi/Cech_complex_blocker.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h index fb452326..e7f548ba 100644 --- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h +++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h @@ -14,8 +14,6 @@ #include // for casting from FT to Filtration_value #include // for CGAL::exact -#include - #include #include #include @@ -76,7 +74,7 @@ class Cech_blocker { Filtration_value radius = 0; bool is_min_enclos_ball = false; Point_cloud points; - points.reserve(boost::size(sc_ptr_->simplex_vertex_range(sh))); + points.reserve(sc_ptr_->dimension(sh)+1); // for each face of simplex sh, test outsider point is indeed inside enclosing ball, if yes, take it and exit loop, otherwise, new sphere is circumsphere of all vertices for (auto face_opposite_vertex : sc_ptr_->boundary_opposite_vertex_simplex_range(sh)) { -- cgit v1.2.3