diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-12-08 23:38:02 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-12-09 21:07:01 +0100 |
commit | 86d7b7aed52c66d12f361a3ee8dc7a0eb419bdbc (patch) | |
tree | 444426ca7292326bf01fe619351533b908c485a8 /CMakeLists.txt | |
parent | 07201b7bdcff5612f573aee10f3caa007a9d98d5 (diff) | |
download | xK-86d7b7aed52c66d12f361a3ee8dc7a0eb419bdbc.tar.gz xK-86d7b7aed52c66d12f361a3ee8dc7a0eb419bdbc.tar.xz xK-86d7b7aed52c66d12f361a3ee8dc7a0eb419bdbc.zip |
degesch: add a unit test for message wrapping algo
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c4c5db9..296a0f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,6 +122,23 @@ target_link_libraries (degesch ${project_libraries}) add_executable (kike kike.c kike-replies.c ${common_sources} ${common_headers}) target_link_libraries (kike ${project_libraries}) +# Tests +function (make_tests_for target_name) + get_target_property (sources ${target_name} SOURCES) + get_target_property (libraries ${target_name} LINK_LIBRARIES) + + set (test test-${target_name}) + add_executable (${test} ${sources}) + target_link_libraries (${test} ${libraries}) + add_test (NAME ${test} COMMAND ${test}) + set_target_properties (${test} PROPERTIES COMPILE_DEFINITIONS TESTING) +endfunction (make_tests_for) + +include (CTest) +if (BUILD_TESTING) + make_tests_for (degesch) +endif (BUILD_TESTING) + # Various clang-based diagnostics, loads of fake positives and spam file (GLOB clang_tidy_sources *.c) set (clang_tidy_checks misc-* readability-* |