catch2/tests/TestScripts/DiscoverTests/CMakeLists.txt
Cristian Le 202bdee977 Fix TEST_DL_PATHS to be multi-args
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2024-03-26 18:04:17 +01:00

23 lines
463 B
CMake

cmake_minimum_required(VERSION 3.10)
project(discover-tests-test
LANGUAGES CXX
)
add_executable(tests
register-tests.cpp
)
add_subdirectory(${CATCH2_PATH} catch2-build)
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain)
enable_testing()
include(Catch)
set(extra_args)
if (CMAKE_VERSION GREATER_EQUAL 3.27)
list(APPEND extra_args
DL_PATHS "$<TARGET_RUNTIME_DLL_DIRS:tests>"
)
endif ()
catch_discover_tests(tests ${extra_args})