From f5d28342ee398c739c7345d8db4fbd653e9a0413 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 8 Jun 2017 07:17:36 +0000 Subject: 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 --- CMakeLists.txt | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c9ceb92b..fbb359e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,10 +3,7 @@ project(GUDHIdev) include(CMakeGUDHIVersion.txt) -set(CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/src/cmake/modules/") -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/cmake/modules/") -message("CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}") -message("CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/cmake/modules/") enable_testing() @@ -34,10 +31,8 @@ if (DEBUG_TRACES) add_definitions(-DDEBUG_TRACES) endif() -# Modules list can be found in CMAKE_MODULE_PATH/GUDHI_modules.cmake -include(GUDHI_modules) - # Add your new module in the list, order is not important +include(GUDHI_modules) add_gudhi_module(common) add_gudhi_module(Alpha_complex) @@ -54,12 +49,7 @@ add_gudhi_module(Subsampling) add_gudhi_module(Tangential_complex) add_gudhi_module(Witness_complex) -# Include module headers -foreach(GUDHI_MODULE ${GUDHI_MODULES}) - if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/src/${GUDHI_MODULE}/include/) - include_directories(src/${GUDHI_MODULE}/include/) - endif() -endforeach() +message("++ GUDHI_MODULES list is:\"${GUDHI_MODULES}\"") # Include module CMake subdirectories # GUDHI_SUB_DIRECTORIES is managed in CMAKE_MODULE_PATH/GUDHI_modules.cmake @@ -73,7 +63,7 @@ endforeach() add_subdirectory(src/GudhUI) -if (NOT WITHOUT_GUDHI_PYTHON) +if (WITH_GUDHI_PYTHON) # specific for cython module add_subdirectory(${GUDHI_CYTHON_PATH}) endif() -- cgit v1.2.3