mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-23 11:57:58 +02:00
added tests
This commit is contained in:
20
tests/CMakeLists.txt
Normal file
20
tests/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
FetchContent_Declare(
|
||||
Catch2
|
||||
GIT_SHALLOW TRUE
|
||||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
GIT_TAG v3.5.3
|
||||
)
|
||||
FetchContent_MakeAvailable(Catch2)
|
||||
list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/extras)
|
||||
|
||||
add_executable(tests test.cpp)
|
||||
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain)
|
||||
|
||||
set_target_properties(tests PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
OUTPUT_NAME run_tests
|
||||
)
|
||||
|
||||
include(CTest)
|
||||
include(Catch)
|
||||
catch_discover_tests(tests)
|
Reference in New Issue
Block a user