26 lines
597 B
CMake
26 lines
597 B
CMake
add_library(testing testing.c)
|
|
set_default_target_options(testing)
|
|
target_include_directories(testing PUBLIC include)
|
|
|
|
function(add_test_suite source)
|
|
string(REGEX REPLACE ".c$" "" name ${source})
|
|
add_executable(${name} ${source})
|
|
set_default_target_options(${name})
|
|
target_link_libraries(${name} PRIVATE lib testing)
|
|
add_test(NAME ${name} COMMAND ${name})
|
|
endfunction()
|
|
|
|
function(add_test_suites)
|
|
foreach(source ${ARGN})
|
|
add_test_suite(${source})
|
|
endforeach()
|
|
endfunction()
|
|
|
|
add_test_suites(
|
|
construct_tests.c
|
|
desugar_tests.c
|
|
fsa_tests.c
|
|
min_heap_tests.c
|
|
parse_tests.c
|
|
)
|