mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-07 13:10:42 +02:00
fixed ctest
This commit is contained in:
parent
9413efa9e5
commit
166a78a2a5
@ -120,6 +120,7 @@ if(AARE_USE_WARNINGS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(AARE_TESTS)
|
if(AARE_TESTS)
|
||||||
|
enable_testing()
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ set_target_properties(tests PROPERTIES
|
|||||||
|
|
||||||
include(CTest)
|
include(CTest)
|
||||||
include(Catch)
|
include(Catch)
|
||||||
|
catch_discover_tests(tests)
|
||||||
|
|
||||||
set(TestSources
|
set(TestSources
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/test.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/test.cpp
|
||||||
@ -34,11 +35,10 @@ target_sources(tests PRIVATE ${TestSources} )
|
|||||||
# target_include_directories(tests PRIVATE ${CMAKE_SOURCE_DIR}/include/common)
|
# target_include_directories(tests PRIVATE ${CMAKE_SOURCE_DIR}/include/common)
|
||||||
target_link_libraries(tests PRIVATE core aare_compiler_flags utils)
|
target_link_libraries(tests PRIVATE core aare_compiler_flags utils)
|
||||||
|
|
||||||
catch_discover_tests(tests
|
|
||||||
# WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/data
|
|
||||||
)
|
|
||||||
|
|
||||||
#configure a header to pass test file paths
|
#configure a header to pass test file paths
|
||||||
get_filename_component(TEST_FILE_PATH ${PROJECT_SOURCE_DIR}/data ABSOLUTE)
|
get_filename_component(TEST_FILE_PATH ${PROJECT_SOURCE_DIR}/data ABSOLUTE)
|
||||||
configure_file(test_config.hpp.in test_config.hpp)
|
configure_file(test_config.hpp.in test_config.hpp)
|
||||||
target_include_directories(tests PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
target_include_directories(tests PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user