summaryrefslogtreecommitdiff
path: root/src/cmake/modules/GUDHI_modules.cmake
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-06-08 07:17:36 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-06-08 07:17:36 +0000
commitf5d28342ee398c739c7345d8db4fbd653e9a0413 (patch)
tree6dff4432c323fbae848bab9b2acfc3aa5d749b23 /src/cmake/modules/GUDHI_modules.cmake
parenta1423daa252b40aa715ce9b83087e02c4f1d2a1d (diff)
Add modules as CMake options in order to be able to activate/desactivate compilation
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cmake_modules_for_gudhi@2515 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 53d5e669ad310c9d8d17c7f95f1e07c3bf658d77
Diffstat (limited to 'src/cmake/modules/GUDHI_modules.cmake')
-rw-r--r--src/cmake/modules/GUDHI_modules.cmake23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/cmake/modules/GUDHI_modules.cmake b/src/cmake/modules/GUDHI_modules.cmake
index 20fc8d17..f95d0c34 100644
--- a/src/cmake/modules/GUDHI_modules.cmake
+++ b/src/cmake/modules/GUDHI_modules.cmake
@@ -1,11 +1,26 @@
# A function to add a new module in GUDHI
set(GUDHI_MODULES "")
+set(GUDHI_MODULES_FULL_LIST "")
function(add_gudhi_module file_path)
+ option("WITH_MODULE_GUDHI_${file_path}" "Activate/desactivate ${file_path} compilation and installation" ON)
+ if (WITH_MODULE_GUDHI_${file_path})
set(GUDHI_MODULES ${GUDHI_MODULES} ${file_path} PARENT_SCOPE)
+ endif()
+ # Required by user_version
+ set(GUDHI_MODULES_FULL_LIST ${GUDHI_MODULES_FULL_LIST} ${file_path} PARENT_SCOPE)
+ # Include module headers is independant - You may ask for no Alpha complex module but Python interface i.e.
+ if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/src/${file_path}/include/)
+ include_directories(src/${file_path}/include/)
+ endif()
+
endfunction(add_gudhi_module)
-# message("++ GUDHI_MODULES list is:\"${GUDHI_MODULES}\"")
+option(WITH_GUDHI_BENCHMARK "Activate/desactivate benchmark compilation" OFF)
+option(WITH_GUDHI_EXAMPLE "Activate/desactivate examples compilation and installation" OFF)
+option(WITH_GUDHI_PYTHON "Activate/desactivate python module compilation and installation" ON)
+option(WITH_GUDHI_TEST "Activate/desactivate examples compilation and installation" ON)
+option(WITH_GUDHI_UTILITIES "Activate/desactivate utilities compilation and installation" ON)
if (WITH_GUDHI_BENCHMARK)
set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};benchmark")
@@ -13,10 +28,10 @@ endif()
if (WITH_GUDHI_EXAMPLE)
set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};example")
endif()
-if (NOT WITHOUT_GUDHI_TEST)
- set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};test")
+if (WITH_GUDHI_TEST)
+ set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};test")
endif()
-if (NOT WITHOUT_GUDHI_UTILITIES)
+if (WITH_GUDHI_UTILITIES)
set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};utilities")
endif()