Notice: If you are member of any public project or group, please make sure that your GitLab username is not the same as the LRZ identifier/Kennung (see https://gitlab.lrz.de/profile/account). Please change your username if necessary. For more information see the section "Public projects / Öffentliche Projekte" at https://doku.lrz.de/display/PUBLIC/GitLab . Thank you!

Cleaned up CMake build scripts.

Removed redundant CMake options, renamed test-campvis to campvis-test and removed pipeline and converter registration, since building shared libraries is mandatory now.
parent 452a6475
......@@ -7,6 +7,7 @@ SET(CAMPVIS_VERSION 1.0.0)
# = Global Build Options ======================================================
OPTION(BUILD_SHARED_LIBS "Build shared libraries (strongly recommended!)" ON)
OPTION(CAMPVIS_DEBUG "Activate debug code?" ON)
OPTION(CAMPVIS_BUILD_LIB_CGT "Build CGT Library" ON)
OPTION(CAMPVIS_BUILD_APPLICATION "Build CAMPVis Application" ON)
OPTION(CAMPVIS_BUILD_MODULES "Build CAMPVis Modules" ON)
OPTION(CAMPVIS_ENABLE_SCRIPTING "Add support for scripting CAMPVis using Lua" OFF)
......@@ -27,6 +28,10 @@ ENDIF()
SET(CAMPVIS_DEFAULT_ENABLED_MODULES "STABLE_NO_DEPENDENCIES" CACHE STRING "Default CAMPVis modules to activate")
SET_PROPERTY(CACHE CAMPVIS_DEFAULT_ENABLED_MODULES PROPERTY STRINGS "NONE" "STABLE_NO_DEPENDENCIES" "STABLE_WITH_EXTERNAL_DEPENDENCIES" "TESTING" "ALL")
IF(NOT BUILD_SHARED_LIBS)
MESSAGE(WARNING "Building shared libraries is turned off. Thus, CAMPVis will most probably not work as intended!\nPlease turn BUILD_SHARED_LIBS on unless you know what you're doing!")
ENDIF(NOT BUILD_SHARED_LIBS)
# propagate CAMPVIS_ENABLE_SCRIPTING to CAMPVIS_BUILD_LIB_LUA to support deprecated code
IF (CAMPVIS_ENABLE_SCRIPTING)
SET(CAMPVIS_BUILD_LIB_LUA ON)
......
......@@ -4,7 +4,7 @@
# LUA_INCLUDE_DIR
# LUA_LIBRARY
IF(CAMPVIS_BUILD_LIB_LUA)
IF(CAMPVIS_ENABLE_SCRIPTING)
SET(LUA_DIR "${CampvisHome}/ext/lua" CACHE PATH "If Lua is not found, set this path")
SET(LUA_INCLUDE_DIR "${LUA_DIR}/src" "${CMAKE_BINARY_DIR}/ext/lua")
......@@ -15,6 +15,6 @@ IF(CAMPVIS_BUILD_LIB_LUA)
ELSE()
SET(LUA_FOUND FALSE)
ENDIF()
ENDIF(CAMPVIS_BUILD_LIB_LUA)
ENDIF(CAMPVIS_ENABLE_SCRIPTING)
MARK_AS_ADVANCED(LUA_DIR LUA_INCLUDE_DIR LUA_LIBRARY)
......@@ -189,9 +189,7 @@ IF(WIN32)
SET(CGT_WITH_WMI TRUE) #< enable Windows Management Instrumentation for hardware detection
ENDIF()
IF(CAMPVIS_DEBUG)
# SET_PROPERTY(GLOBAL PROPERTY COMPILE_DEFINITIONS_DEBUG CGT_DEBUG CAMPVIS_DEBUG)
LIST(APPEND CampvisGlobalDefinitions -DCGT_DEBUG -DCAMPVIS_DEBUG)
# set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_DEBUG "CGT_DEBUG CAMPVIS_DEBUG")
ENDIF()
# minimum Qt version
......
......@@ -167,11 +167,6 @@ MACRO(INCLUDE_MODULE ModuleDirectory ModuleListFile)
# add definition that this module is activated
LIST(APPEND CampvisGlobalDefinitions -DCAMPVIS_HAS_MODULE_${ModuleDirectoryUpper})
# parse all header files for pipeline classes to add them to the pipeline registration
FOREACH(HeaderFile ${ThisModHeaders})
PARSE_HEADER_FOR_PIPELINE("modules/${HeaderFile}")
ENDFOREACH()
ENDIF(${CAMPVIS_BUILD_MODULE_${ModDirUpper}})
# unset module settings to avoid duplicates if module cmake file misses sth.
......
PROJECT(campvis-core)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
#INCLUDE(../cmake/commonconf.cmake)
INCLUDE(../cmake/commonconf.cmake)
MESSAGE(STATUS "Configuring CAMPVis-Core")
......
PROJECT(test-campvis)
PROJECT(campvis-test)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
MESSAGE(STATUS "Configuring googletest for campvis Modules")
MESSAGE(STATUS "Configuring CAMPVis Test")
FILE(GLOB TestCampvisHeaders RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
*.h
......@@ -26,13 +26,13 @@ endif()
LINK_DIRECTORIES(${CampvisGlobalLinkDirectories} ${CampvisModulesLinkDirectories})
ADD_EXECUTABLE(test-campvis
ADD_EXECUTABLE(campvis-test
${TestCampvisSources} ${TestCampvisHeaders}
)
ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${CampvisApplicationDefinitions} ${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs} ${CampvisHome}/ext/gtest-1.7.0/ ${CampvisHome}/ext/gtest-1.7.0/include)
TARGET_LINK_LIBRARIES(test-campvis gtest sigslot cgt campvis-core campvis-modules ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES})
TARGET_LINK_LIBRARIES(campvis-test gtest sigslot cgt campvis-core campvis-modules ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES})
if (CAMPVIS_GROUP_SOURCE_FILES)
DEFINE_SOURCE_GROUPS_FROM_SUBDIR(TestCampvisSources ${CampvisHome}/test "")
......
......@@ -84,6 +84,9 @@ protected:
void init() {
// create pipeline
_pipeline = PipelineFactory::getRef().createPipeline(_pipelineName, _dataContainer);
if (! _pipeline)
FAIL();
ASSERT_TRUE(_pipeline != nullptr);
if (_pipeline != nullptr) {
......
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