diff options
Diffstat (limited to '1/HelloWorldC/CMakeLists.txt')
-rw-r--r-- | 1/HelloWorldC/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/1/HelloWorldC/CMakeLists.txt b/1/HelloWorldC/CMakeLists.txt new file mode 100644 index 0000000..d235a0c --- /dev/null +++ b/1/HelloWorldC/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.18) + +enable_testing() + +project(HelloWorld C) + +add_executable(HelloWorld main.c) + +find_library(CMocka cmocka) + +target_link_libraries(HelloWorld cmocka) + +add_test( + NAME HelloWorldTest + COMMAND HelloWorld) + +add_test( + NAME HelloWorldMemoryTest + COMMAND valgrind --error-exitcode=1 --leak-check=full $<TARGET_FILE:HelloWorld>) |