reorganizing of slsDetectorSoftware

This commit is contained in:
Erik Frojdh
2019-03-20 17:07:02 +01:00
parent 03402d0e9e
commit 4b2c6af4f5
18 changed files with 76 additions and 159 deletions

View File

@ -7,13 +7,13 @@ include_directories(
${PROJECT_SOURCE_DIR}/catch
)
if(SLS_USE_TESTS)
set(TEST_SOURCES
src/test-slsDetector.cpp
src/test.cpp
)
add_executable(detector_test ${TEST_SOURCES})
target_link_libraries(detector_test
slsDetectorShared
slsSupportLib
@ -24,40 +24,16 @@ if(SLS_USE_TESTS)
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
add_executable(a src/a.cpp)
target_link_libraries(a
slsDetectorShared
slsSupportLib
pthread
rt
)
set_target_properties(a PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
set_target_properties(a PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
endif()
#option(SLS_USE_TESTS "Determines whether to build tests." OFF)
# if(SLS_USE_TESTS)
# # Prepare "Catch" library for other executables
# set(CATCH_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/catch)
# add_library(Catch INTERFACE)
# target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR})
# # Make test executable
# add_executable(tests ${BASE_TEST_SOURCES})
# target_link_libraries(tests Catch)
# set_target_properties(tests PROPERTIES
# RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
# )
# #enable_testing()
# #add_test(NAME CommandLineClient COMMAND tests)
# endif()
# install(TARGETS sls_client DESTINATION bin)