-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
33 lines (28 loc) · 1.13 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
project(examples)
function(tetl_add_example _target)
set(options OPTIONAL WILL_FAIL)
cmake_parse_arguments(tetl_add_example "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
add_executable("example_${_target}" "${_target}.cpp")
target_compile_definitions("example_${_target}" PRIVATE TETL_DEBUG=1)
target_link_libraries("example_${_target}" PRIVATE tetl::etl tetl::compiler_options tetl::compiler_warnings tetl::code_coverage)
add_test(NAME "example: ${_target}" COMMAND "example_${_target}")
set_tests_properties("example: ${_target}" PROPERTIES WILL_FAIL ${tetl_add_example_WILL_FAIL})
endfunction()
tetl_add_example("algorithm")
tetl_add_example("all_headers")
tetl_add_example("array")
tetl_add_example("bitset")
tetl_add_example("cassert" WILL_FAIL TRUE)
tetl_add_example("chrono")
tetl_add_example("cmath")
tetl_add_example("memory")
tetl_add_example("numeric")
tetl_add_example("optional")
tetl_add_example("set")
tetl_add_example("source_location")
tetl_add_example("string")
tetl_add_example("tuple")
tetl_add_example("type_traits")
tetl_add_example("utility")
tetl_add_example("vector")
add_subdirectory(experimental)