mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-29 01:20:02 +02:00

* removed Makefile for moench and integrated the build in CMake * broke out tiff reading and writing to its own library * moved tiff includes to include/sls * moved tiffio source to src * removed incorrectly used bps * cleanup and tests for tiffio * removed using namespace std from header * some fixing for moench04 * Program for offline processing renamed Co-authored-by: Anna Bergamaschi <anna.bergamaschi@psi.ch>
61 lines
1.4 KiB
CMake
Executable File
61 lines
1.4 KiB
CMake
Executable File
# SPDX-License-Identifier: LGPL-3.0-or-other
|
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
include_directories(
|
|
${PROJECT_SOURCE_DIR}/libs/catch
|
|
include
|
|
)
|
|
|
|
set(SLS_TEST_SOURCES
|
|
test.cpp
|
|
)
|
|
|
|
add_executable(testclient src/testclient.cpp)
|
|
target_link_libraries(testclient slsSupportStatic)
|
|
set_target_properties(testclient PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
add_executable(testserver src/testserver.cpp)
|
|
target_link_libraries(testserver slsSupportStatic)
|
|
set_target_properties(testserver PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
add_executable(tests ${SLS_TEST_SOURCES})
|
|
target_link_libraries(tests
|
|
PUBLIC
|
|
slsProjectOptions
|
|
slsSupportStatic
|
|
pthread
|
|
rt
|
|
PRIVATE
|
|
slsProjectWarnings
|
|
)
|
|
|
|
if (SLS_USE_DETECTOR)
|
|
target_link_libraries(tests PUBLIC
|
|
slsDetectorStatic
|
|
)
|
|
endif (SLS_USE_DETECTOR)
|
|
|
|
if (SLS_USE_RECEIVER)
|
|
target_link_libraries(tests PUBLIC
|
|
slsReceiverStatic
|
|
)
|
|
endif (SLS_USE_RECEIVER)
|
|
if (SLS_USE_MOENCH)
|
|
target_link_libraries(tests PUBLIC
|
|
tiffio
|
|
)
|
|
endif()
|
|
|
|
if((CMAKE_BUILD_TYPE STREQUAL "Release") AND SLS_LTO_AVAILABLE)
|
|
set_property(TARGET tests PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
|
|
endif()
|
|
|
|
set_target_properties(tests PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
|
)
|
|
|
|
include(CTest)
|
|
include(Catch)
|
|
catch_discover_tests(tests)
|