CMAKE: implemented method to disable a module via cmake

use -DDISABLED_AC_MODULES or config.cmake file to define it
This commit is contained in:
Yehonal
2017-03-20 16:51:47 +01:00
parent ab98e56839
commit 603753dfff
3 changed files with 10 additions and 1 deletions

View File

@@ -116,6 +116,13 @@ endif()
# add modules and dependencies
CU_SUBDIRLIST(sub_DIRS "${CMAKE_SOURCE_DIR}/modules" FALSE FALSE)
FOREACH(subdir ${sub_DIRS})
get_filename_component(MODULENAME ${subdir} NAME)
if (";${DISABLED_AC_MODULES};" MATCHES ";${MODULENAME};")
continue()
endif()
STRING(REGEX REPLACE "^${CMAKE_SOURCE_DIR}/" "" subdir_rel ${subdir})
if(EXISTS "${subdir}/CMakeLists.txt")
message("Loading module: ${subdir_rel}")