Changeset View
Changeset View
Standalone View
Standalone View
projectmanagers/cmake/tests/manual/unit_tests/CMakeLists.txt
1 | project(unittests) | 1 | project(unittests) | ||
---|---|---|---|---|---|
2 | enable_testing() | 2 | enable_testing() | ||
3 | 3 | | |||
4 | add_executable(test_success success.cpp) | 4 | add_executable(test_success success.cpp) | ||
5 | add_test(success test_success) | 5 | add_test(success test_success) | ||
6 | 6 | | |||
7 | add_executable(test_fail fail.cpp) | 7 | add_executable(test_fail fail.cpp) | ||
8 | set_target_properties(test_fail PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | 8 | set_target_properties(test_fail PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
9 | add_test(fail test_fail) | 9 | add_test(fail test_fail) | ||
10 | set_tests_properties(fail PROPERTIES | ||||
11 | FOO "foo" | ||||
12 | BAR TRUE | ||||
13 | MULTILINE "this is | ||||
14 | a multi | ||||
15 | line property" | ||||
16 | QUOTES "\"\\\\\"\\\\\\" | ||||
17 | WORKING_DIRECTORY "/bar/baz" | ||||
18 | WILL_FAIL TRUE) | ||||
10 | 19 | | |||
11 | add_executable(four_test math_test.cpp) | 20 | add_executable(four_test math_test.cpp) | ||
12 | add_test(test_three four_test 3) | 21 | add_test(NAME test_three COMMAND four_test 3 WORKING_DIRECTORY "/foo") | ||
13 | add_test(test_four four_test 4) | 22 | add_test(test_four four_test 4) | ||
14 | 23 | | |||
15 | add_subdirectory(five) | 24 | add_subdirectory(five) |