2015-07-28 19:03:46 +02:00
|
|
|
project(criterion_samples)
|
|
|
|
|
|
|
|
set(CMAKE_C_FLAGS "-std=c99 -Wall -Wextra -pedantic")
|
|
|
|
|
|
|
|
include_directories(../include)
|
|
|
|
|
|
|
|
set(SAMPLES
|
|
|
|
signal
|
|
|
|
report
|
|
|
|
suites
|
|
|
|
fixtures
|
|
|
|
asserts
|
|
|
|
more-suites
|
|
|
|
long-messages
|
|
|
|
description
|
|
|
|
other-crashes
|
|
|
|
simple
|
|
|
|
)
|
|
|
|
|
2015-07-29 11:58:51 +02:00
|
|
|
set(SCRIPTS
|
|
|
|
tap_test
|
|
|
|
early_exit
|
|
|
|
verbose
|
|
|
|
list
|
|
|
|
pattern
|
|
|
|
fail_fast
|
|
|
|
help
|
|
|
|
)
|
|
|
|
|
2015-07-28 19:03:46 +02:00
|
|
|
foreach(sample ${SAMPLES})
|
|
|
|
add_executable(${sample} ${sample}.c)
|
|
|
|
target_link_libraries(${sample} criterion)
|
2015-07-29 11:58:51 +02:00
|
|
|
add_test(${sample} ${sample})
|
|
|
|
set_property(TEST ${sample} PROPERTY
|
|
|
|
ENVIRONMENT "CRITERION_ALWAYS_SUCCEED=1"
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
foreach(script ${SCRIPTS})
|
|
|
|
add_test(${script} ${CMAKE_CURRENT_LIST_DIR}/tests/${script}.sh)
|
2015-07-28 19:03:46 +02:00
|
|
|
endforeach()
|