Files
slsDetectorPackage/tests/CMakeLists.txt
Dhanya Thattil 045d9440de
All checks were successful
Build on local RHEL9 / build (push) Successful in 1m25s
Build on local RHEL8 / build (push) Successful in 3m32s
Build on RHEL9 / build (push) Successful in 4m17s
Build on RHEL8 / build (push) Successful in 4m35s
Dev/include file (#1306)
* create a include command calling the same function as parameters (cmd generation and autocompletion), testing parameters and include

* added include in command line and python and its supposed to do the same as parameters command. both are tested

* added colorama

* moved test_free and test_command python tests to tests/scripts folder from python/tests due to CI issues with dependencies

* generated commands

* formatting

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
2026-01-07 10:45:26 +01:00

67 lines
1.9 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
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)
configure_file(scripts/test_simulators.py ${CMAKE_BINARY_DIR}/bin/test_simulators.py COPYONLY)
configure_file(scripts/test_frame_synchronizer.py ${CMAKE_BINARY_DIR}/bin/test_frame_synchronizer.py COPYONLY)
configure_file(scripts/utils_for_test.py ${CMAKE_BINARY_DIR}/bin/utils_for_test.py COPYONLY)
configure_file(scripts/test_roi.py ${CMAKE_BINARY_DIR}/bin/test_roi.py COPYONLY)
configure_file(scripts/test_free.py ${CMAKE_BINARY_DIR}/bin/test_free.py COPYONLY)
configure_file(scripts/test_commands.py ${CMAKE_BINARY_DIR}/bin/test_commands.py COPYONLY)