Skip to content
Snippets Groups Projects
Commit ff22ae12 authored by Martin Killenberg's avatar Martin Killenberg
Browse files

Merge branch 'master' of github.com:ChimeraTK/ApplicationCore

parents d350573e 14761e3e
No related branches found
No related tags found
No related merge requests found
# CMakeLists.txt template for an ApplicationCore-based server
#
#
PROJECT(ChimeraTK-ApplicationCore-TemplateServer)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
project(ChimeraTK-ApplicationCore-TemplateServer)
cmake_minimum_required(VERSION 3.5.1)
# Use the project template to get the settings required for an application core project
set(${PROJECT_NAME}_MAJOR_VERSION 01)
......@@ -51,11 +51,11 @@ set_target_properties(${PROJECT_NAME}-xmlGenerator PROPERTIES LINK_FLAGS "${Chim
target_link_libraries(${PROJECT_NAME}-xmlGenerator ${PROJECT_NAME}lib ${ChimeraTK-ApplicationCore_LIBRARIES})
# Process tests:
ENABLE_TESTING()
enable_testing()
add_subdirectory(${CMAKE_SOURCE_DIR}/tests)
# Copy the (test) config files to the build directory
FILE( COPY ${CMAKE_SOURCE_DIR}/config/ DESTINATION ${PROJECT_BINARY_DIR})
file( COPY ${CMAKE_SOURCE_DIR}/config/ DESTINATION ${PROJECT_BINARY_DIR})
# Installation:
......
# CMakeLists.txt for server modules
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
cmake_minimum_required(VERSION 3.5.1)
include_directories(include)
aux_source_directory(src library_sources)
......
# CMakeLists.txt for test modules
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
cmake_minimum_required(VERSION 3.5.1)
# Add BOOST dependencies
FIND_PACKAGE(Boost COMPONENTS thread system unit_test_framework REQUIRED)
find_package(Boost COMPONENTS thread system unit_test_framework REQUIRED)
# The tests also require the server headers (TODO Potentially, module includes are also needed)
include_directories(${CMAKE_SOURCE_DIR}/server/include)
......@@ -16,13 +16,14 @@ foreach( testExecutableSrcFile ${testExecutables})
add_executable(${excutableName} ${testExecutableSrcFile})
target_sources(${excutableName} PRIVATE ${SERVER_SRC_DIR}/Server.cc)
set_target_properties(${excutableName}
PROPERTIES
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
LINK_FLAGS "${CMAKE_LINK_FLAGS}"
)
target_link_libraries(${excutableName} ${PROJECT_NAME}lib ${ChimeraTK-ApplicationCore_LIBRARIES} ${Adapter_LIBRARIES} )
add_test(
NAME ${excutableName}
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${excutableName}
COMMAND ${CMAKE_BINARY_DIR}/${excutableName}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
endforeach( testExecutableSrcFile )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment