2019-11-24 14:12:56 -05:00
|
|
|
find_package(doctest REQUIRED)
|
2017-07-25 12:19:11 -04:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/tests)
|
|
|
|
|
2018-04-22 19:39:10 -04:00
|
|
|
set(CATIMA_TESTS test_calculations test_generated test_storage test_structures test_dedx_range test_abundances)
|
2017-07-25 12:19:11 -04:00
|
|
|
|
|
|
|
foreach(entry ${CATIMA_TESTS})
|
|
|
|
add_executable(${entry} ${entry}.cpp)
|
2019-11-24 14:12:56 -05:00
|
|
|
target_link_libraries(${entry} PRIVATE catima)
|
|
|
|
target_compile_features(${entry} PRIVATE cxx_std_17)
|
2018-04-18 09:19:03 -04:00
|
|
|
add_test(${entry} ${PROJECT_BINARY_DIR}/tests/${entry})
|
2017-07-25 12:19:11 -04:00
|
|
|
endforeach(entry in ${CATIMA_TESTS})
|
|
|
|
|
2018-07-31 11:40:25 -04:00
|
|
|
if(REACTIONS)
|
2018-05-01 20:18:50 -04:00
|
|
|
add_executable(test_reaction test_reaction.cpp)
|
2018-05-02 19:23:47 -04:00
|
|
|
target_link_libraries(test_reaction catima)
|
2019-11-24 14:12:56 -05:00
|
|
|
target_compile_features(test_reaction PRIVATE cxx_std_17)
|
2018-05-01 20:18:50 -04:00
|
|
|
add_test(test_reaction ${PROJECT_BINARY_DIR}/tests/test_reaction)
|
2018-07-31 11:40:25 -04:00
|
|
|
endif(REACTIONS)
|
2017-07-25 12:19:11 -04:00
|
|
|
|
|
|
|
set(C_TESTS test_c)
|
|
|
|
MESSAGE( STATUS "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} )
|
|
|
|
foreach(entry ${C_TESTS})
|
|
|
|
add_executable(${entry} ${entry}.c)
|
|
|
|
target_link_libraries(${entry} catima)
|
2019-11-24 14:12:56 -05:00
|
|
|
target_compile_features(${entry} PRIVATE cxx_std_17)
|
2018-04-18 09:19:03 -04:00
|
|
|
endforeach(entry in ${C_TESTS})
|