mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-30 18:00:05 +02:00
64 lines
1.5 KiB
CMake
64 lines
1.5 KiB
CMake
MESSAGE( STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR} )
|
|
MESSAGE( STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )
|
|
|
|
|
|
|
|
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
|
|
pthread
|
|
rt
|
|
)
|
|
set_target_properties(detector_test PROPERTIES
|
|
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
|
|
)
|
|
|
|
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)
|
|
|