diff options
author | Tom Willemse | 2020-10-12 20:46:11 -0700 |
---|---|---|
committer | Tom Willemse | 2020-10-12 20:46:11 -0700 |
commit | 38a6ee0725ddc4eb57357a2398bc82dc8b264c7e (patch) | |
tree | 42aa4c4d3f80787b5ff5837ef1e7e23b45f75822 /1/HelloWorldC/CMakeLists.txt | |
download | crafting-interpreters-38a6ee0725ddc4eb57357a2398bc82dc8b264c7e.tar.gz crafting-interpreters-38a6ee0725ddc4eb57357a2398bc82dc8b264c7e.zip |
Initial commit
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>) |