summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-05-18 08:47:16 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-05-18 08:47:16 +0000
commitd6bb19de457fa74c84dbd6d8afa63074fefb4552 (patch)
treea206d3464a26585615b902f4b5d12208dcae2b7a /src/CMakeLists.txt
parent170b4936bf883edb40268a8fac650971a26e46bf (diff)
Modify the way cmake handles utilities, examples, test and benchmarks with new options to activate/desactivate them.
Move hypergenerator as a common utility. Move random point generation from hypergenerator in src/common/include/gudhi/random_point_generators.h git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cmake_modules_for_gudhi@2442 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e2d13e4b0c09455fb604b684f6d71530352271eb
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ebcb6888..77a03c17 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,6 +7,9 @@ enable_testing()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
+# To be done first - Modules list can be found in CMAKE_MODULE_PATH/GUDHI_modules.cmake
+include(GUDHI_modules)
+
# For "make doxygen"
set(GUDHI_USER_VERSION_DIR ${CMAKE_SOURCE_DIR})
include(GUDHI_doxygen_target)
@@ -39,27 +42,22 @@ endif()
# Gudhi compilation part
include_directories(include)
-add_subdirectory(example/common)
-add_subdirectory(example/Simplex_tree)
-add_subdirectory(example/Persistent_cohomology)
-add_subdirectory(example/Skeleton_blocker)
-add_subdirectory(example/Contraction)
-add_subdirectory(example/Bitmap_cubical_complex)
-add_subdirectory(example/Witness_complex)
-add_subdirectory(example/Alpha_complex)
-add_subdirectory(example/Rips_complex)
-add_subdirectory(example/Spatial_searching)
-add_subdirectory(example/Subsampling)
-add_subdirectory(example/Tangential_complex)
-add_subdirectory(example/Bottleneck_distance)
-
-# data points generator
-add_subdirectory(data/points/generator)
+# Include module CMake subdirectories
+# GUDHI_SUB_DIRECTORIES is managed in CMAKE_MODULE_PATH/GUDHI_modules.cmake
+foreach(GUDHI_MODULE ${GUDHI_MODULES})
+ foreach(GUDHI_SUB_DIRECTORY ${GUDHI_SUB_DIRECTORIES})
+ if(EXISTS ${CMAKE_SOURCE_DIR}/${GUDHI_SUB_DIRECTORY}/${GUDHI_MODULE}/CMakeLists.txt)
+ add_subdirectory(src/${GUDHI_MODULE}/${GUDHI_SUB_DIRECTORY}/)
+ endif(EXISTS ${CMAKE_SOURCE_DIR}/${GUDHI_SUB_DIRECTORY}/${GUDHI_MODULE}/CMakeLists.txt)
+ endforeach(GUDHI_SUB_DIRECTORY ${GUDHI_SUB_DIRECTORIES})
+endforeach(GUDHI_MODULE ${GUDHI_MODULES})
add_subdirectory(GudhUI)
-# specific for cython module
-add_subdirectory(${GUDHI_CYTHON_PATH})
+if (NOT WITHOUT_GUDHI_PYTHON)
+ # specific for cython module
+ add_subdirectory(${GUDHI_CYTHON_PATH})
+endif()
#---------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------