Commit 9622f2ff authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed CMake build scripts to better handle default enabled modules and...

Fixed CMake build scripts to better handle default enabled modules and specifically disabled modules.
parent 293d43dd
......@@ -47,7 +47,7 @@ MACRO(INCLUDE_MODULE ModuleDirectory ModuleListFile)
SET(ThisModDir ${ModulesDir}/${ModuleDirectory})
# if module is not enabled, load .cmake file for the first time to gather module status and other meta information
IF(NOT CAMPVIS_BUILD_MODULE_${ModDirUpper})
IF(NOT DEFINED CAMPVIS_BUILD_MODULE_${ModDirUpper})
# add a CMake option for building this module
OPTION(CAMPVIS_BUILD_MODULE_${ModDirUpper} "Build Module ${ModDir} (${ThisModStatus})" OFF)
......@@ -71,10 +71,10 @@ MACRO(INCLUDE_MODULE ModuleDirectory ModuleListFile)
IF(${CAMPVIS_DEFAULT_ENABLED_MODULES} STREQUAL "ALL")
SET(CAMPVIS_BUILD_MODULE_${ModDirUpper} ON CACHE BOOL "Build Module ${ModDir} (${ThisModStatus})" FORCE)
ENDIF()
ENDIF(NOT CAMPVIS_BUILD_MODULE_${ModDirUpper})
ENDIF(NOT DEFINED CAMPVIS_BUILD_MODULE_${ModDirUpper})
# if module is enabled, load .cmake file for the second time, this time also parsing its build instructions
IF(CAMPVIS_BUILD_MODULE_${ModDirUpper})
IF(${CAMPVIS_BUILD_MODULE_${ModDirUpper}})
SET(ModuleEnabled TRUE)
INCLUDE(${ModuleListFile})
......@@ -108,7 +108,7 @@ MACRO(INCLUDE_MODULE ModuleDirectory ModuleListFile)
FOREACH(HeaderFile ${ThisModHeaders})
PARSE_HEADER_FOR_PIPELINE("modules/${HeaderFile}")
ENDFOREACH()
ENDIF(CAMPVIS_BUILD_MODULE_${ModDirUpper})
ENDIF(${CAMPVIS_BUILD_MODULE_${ModDirUpper}})
# unset module settings to avoid duplicates if module cmake file misses sth.
UNSET(ThisModDefinitions)
......
# CMake file for AdvancedUsVis module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# Source files:
FILE(GLOB ThisModSources RELATIVE ${ModulesDir}
modules/advancedusvis/datastructures/*.cpp
......@@ -26,7 +26,7 @@ IF(ModuleEnabled)
SET(ThisModShaderDirectories "modules/advancedusvis/glsl")
SET(ThisModDependencies vis io preprocessing)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus TESTING)
SET(ThisModExternalDependencies FALSE)
......@@ -91,7 +91,7 @@ namespace campvis {
std::vector<AbstractPointPredicate*> preds = _prop->getPredicateHistogram()->getPredicates();
double w = static_cast<double>(hw) / preds.size();
for (size_t i = 0; i < preds.size(); ++i) {
for (int i = 0; i < static_cast<int>(preds.size()); ++i) {
if (i == _selectedPredicate)
painter.setPen(QPen(Qt::black, 2.f, Qt::DashDotDotLine));
else
......@@ -285,7 +285,7 @@ namespace campvis {
}
AbstractPointPredicate* PointPredicateRenderArea::getPredicate(int i) {
std::vector<AbstractPointPredicate*> preds = _prop->getPredicateHistogram()->getPredicates();
tgtAssert(i >= 0 && i < preds.size(), "Index out of bounds!");
tgtAssert(i >= 0 && i < static_cast<int>(preds.size()), "Index out of bounds!");
return preds[i];
}
......
# CMake file for campcom module
IF(ModuleEnabled)
IF(${ModuleEnabled})
LIST(APPEND CMAKE_MODULE_PATH "${ModulesDir}/campcom")
FIND_PACKAGE(CAMPCom REQUIRED)
......@@ -31,7 +31,7 @@ IF(ModuleEnabled)
)
SET(ThisModDependencies vis)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus TESTING)
SET(ThisModExternalDependencies TRUE)
# CMake file for columbia module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# Source files:
FILE(GLOB ThisModSources RELATIVE ${ModulesDir}
modules/columbia/datastructures/*.cpp
......@@ -19,7 +19,7 @@ IF(ModuleEnabled)
)
SET(ThisModShaderDirectories "modules/columbia/glsl")
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus EXPERIMENTAL)
SET(ThisModExternalDependencies FALSE)
# CMake file for DevIL module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# Tell TGT that we have the DevIL module
LIST(APPEND ThisModDefinitions -DTGT_HAS_DEVIL)
......@@ -61,7 +61,7 @@ IF(ModuleEnabled)
FILE(GLOB ThisModHeaders RELATIVE ${ModulesDir}
modules/devil/processors/*.h
)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus STABLE)
IF(WIN32)
......
# CMake file for IO module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# Source files:
FILE(GLOB ThisModSources RELATIVE ${ModulesDir}
modules/io/processors/*.cpp
......@@ -10,7 +10,7 @@ IF(ModuleEnabled)
FILE(GLOB ThisModHeaders RELATIVE ${ModulesDir}
modules/io/processors/*.h
)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus STABLE)
SET(ThisModExternalDependencies FALSE)
# CMake file for ITK module
IF(ModuleEnabled)
IF(${ModuleEnabled})
FIND_PACKAGE (ITK REQUIRED)
IF(ITK_FOUND)
......@@ -27,7 +27,7 @@ IF(ModuleEnabled)
modules/itk/processors/*.h
modules/itk/core/*.h
)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus STABLE)
SET(ThisModExternalDependencies TRUE)
# CMake file for IXPV module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# Source files:
FILE(GLOB ThisModSources RELATIVE ${ModulesDir}
modules/ixpv/pipelines/*.cpp
......@@ -17,7 +17,7 @@ IF(ModuleEnabled)
SET(ThisModShaderDirectories "modules/ixpv/glsl")
SET(ThisModDependencies vis devil io)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus TESTING)
SET(ThisModExternalDependencies FALSE)
# CMake file for manualsegmentation module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# Source files:
FILE(GLOB ThisModSources RELATIVE ${ModulesDir}
modules/manualsegmentation/pipelines/*.cpp
......@@ -15,7 +15,7 @@ IF(ModuleEnabled)
modules/manualsegmentation/tools/*.h
)
SET(ThisModDependencies io itk vis)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus EXPERIMENTAL)
SET(ThisModExternalDependencies FALSE)
# CMake file for Preprocessing module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# Source files:
FILE(GLOB ThisModSources RELATIVE ${ModulesDir}
modules/preprocessing/pipelines/*.cpp
......@@ -18,7 +18,7 @@ IF(ModuleEnabled)
SET(ThisModShaderDirectories "modules/preprocessing/glsl")
SET(ThisModDependencies vis)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus STABLE)
SET(ThisModExternalDependencies FALSE)
# CMake file for Randomwalk module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# build RadomWalksLib library
ADD_SUBDIRECTORY(modules/randomwalk/ext/RandomWalksLib)
......@@ -16,7 +16,7 @@ IF(ModuleEnabled)
FILE(GLOB ThisModHeaders RELATIVE ${ModulesDir}
modules/randomwalk/processors/*.h
)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus STABLE)
SET(ThisModExternalDependencies FALSE)
# CMake file for registration module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# add NLOPT project as external dependency
ADD_SUBDIRECTORY(modules/registration/ext/nlopt-stripped)
......@@ -26,7 +26,7 @@ IF(ModuleEnabled)
SET(ThisModShaderDirectories "modules/registration/glsl")
SET(ThisModDependencies vis io)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus EXPERIMENTAL)
SET(ThisModExternalDependencies FALSE)
# CMake file for Tensor module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# Source files:
FILE(GLOB ThisModSources RELATIVE ${ModulesDir}
modules/tensor/processors/*.cpp
......@@ -16,7 +16,7 @@ IF(ModuleEnabled)
SET(ThisModShaderDirectories "modules/tensor/glsl")
SET(ThisModDependencies io vis)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus STABLE)
SET(ThisModExternalDependencies FALSE)
# CMake file for Velocity Field module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# Source files:
FILE(GLOB ThisModSources RELATIVE ${ModulesDir}
modules/vectorfield/processors/*.cpp
......@@ -17,7 +17,7 @@ IF(ModuleEnabled)
SET(ThisModShaderDirectories "modules/vectorfield/glsl")
SET(ThisModDependencies io vis)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus STABLE)
SET(ThisModExternalDependencies FALSE)
# CMake file for vis module
IF(ModuleEnabled)
IF(${ModuleEnabled})
# Source files:
FILE(GLOB ThisModSources RELATIVE ${ModulesDir}
modules/vis/pipelines/*.cpp
......@@ -18,7 +18,7 @@ IF(ModuleEnabled)
SET(ThisModShaderDirectories "modules/vis/glsl")
SET(ThisModDependencies io)
ENDIF(ModuleEnabled)
ENDIF(${ModuleEnabled})
SET(ThisModStatus STABLE)
SET(ThisModExternalDependencies FALSE)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment