summaryrefslogtreecommitdiff
path: root/src/cmake/modules/GUDHI_modules.cmake
diff options
context:
space:
mode:
authorGard Spreemann <gspr@nonempty.org>2019-09-25 14:53:36 +0200
committerGard Spreemann <gspr@nonempty.org>2019-09-25 14:53:36 +0200
commit70ad5fc411b0e0a3d590ad281fc97d488994062b (patch)
treeb0ddd84d7ee935936787eee2b75f78f2e21c41f0 /src/cmake/modules/GUDHI_modules.cmake
parentb50046e487ab42cdef19b02128a9f498d6a36482 (diff)
parent5ccee32ec2ba38743c6b96867db3e1b5151e45e4 (diff)
Merge branch 'dfsg/latest' into debian/sid
Diffstat (limited to 'src/cmake/modules/GUDHI_modules.cmake')
-rw-r--r--src/cmake/modules/GUDHI_modules.cmake42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/cmake/modules/GUDHI_modules.cmake b/src/cmake/modules/GUDHI_modules.cmake
new file mode 100644
index 00000000..aab1dd08
--- /dev/null
+++ b/src/cmake/modules/GUDHI_modules.cmake
@@ -0,0 +1,42 @@
+# A function to add a new module in GUDHI
+
+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} CACHE INTERNAL "GUDHI_MODULES")
+ else()
+ set(GUDHI_MISSING_MODULES ${GUDHI_MISSING_MODULES} ${file_path} CACHE INTERNAL "GUDHI_MISSING_MODULES")
+ 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)
+
+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")
+endif()
+if (WITH_GUDHI_EXAMPLE)
+ set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};example")
+endif()
+if (WITH_GUDHI_TEST)
+ set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};test")
+endif()
+if (WITH_GUDHI_UTILITIES)
+ set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};utilities")
+endif()
+
+message("++ GUDHI_SUB_DIRECTORIES list is:\"${GUDHI_SUB_DIRECTORIES}\"")
+
+
+