diff options
Diffstat (limited to 'simloop/CMakeLists.txt')
| -rw-r--r-- | simloop/CMakeLists.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/simloop/CMakeLists.txt b/simloop/CMakeLists.txt new file mode 100644 index 0000000..2e0114b --- /dev/null +++ b/simloop/CMakeLists.txt | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.5) | ||
| 2 | |||
| 3 | project(simloop) | ||
| 4 | |||
| 5 | set(CMAKE_C_STANDARD 23) | ||
| 6 | set(CMAKE_C_STANDARD_REQUIRED On) | ||
| 7 | set(CMAKE_C_EXTENSIONS Off) | ||
| 8 | |||
| 9 | add_library(simloop | ||
| 10 | include/simloop.h | ||
| 11 | src/simloop.c) | ||
| 12 | |||
| 13 | target_include_directories(simloop PUBLIC | ||
| 14 | include) | ||
| 15 | |||
| 16 | target_compile_options(simloop PRIVATE -Wall -Wextra -Wpedantic) | ||
| 17 | |||
| 18 | # Test | ||
| 19 | |||
| 20 | add_executable(simloop_test | ||
| 21 | test/simloop_test.c) | ||
| 22 | |||
| 23 | target_link_libraries(simloop_test | ||
| 24 | simloop | ||
| 25 | ctest) | ||
| 26 | |||
| 27 | target_compile_options(simloop_test PRIVATE -DUNIT_TEST -DNDEBUG -Wall -Wextra -pedantic) | ||
| 28 | |||
| 29 | add_test(NAME simloop_test COMMAND simloop_test --unittest) | ||
