diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-02-19 13:30:45 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-02-19 13:30:45 +0100 |
| commit | e6d59a7b506f610b82340b62457f9dd9ad0cb53d (patch) | |
| tree | b83affc4789146822a9fdbda88402b87c5f0fa28 /CMakeLists.txt | |
| parent | e34239cf2bdb6bd810826b82c2a66873bd0881e2 (diff) | |
| download | snake.s-e6d59a7b506f610b82340b62457f9dd9ad0cb53d.tar.xz snake.s-e6d59a7b506f610b82340b62457f9dd9ad0cb53d.zip | |
feat: integrate basic CMocka tests
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e2baef..7f97d30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,15 +6,29 @@ project("snake.s" LANGUAGES ASM ) +option(SNAKE_BUILD_TESTS "Build the snake.s tests" ON) + add_subdirectory("libs") -add_executable("snake.s" +add_library("snake.core" "src/error.S" - "src/main.S" + "src/snake.S" +) + +target_include_directories("snake.core" PUBLIC + "src" ) -target_link_libraries("snake.s" PRIVATE +target_link_libraries("snake.core" PUBLIC "bindings::SDL2" ) +add_executable("snake.s" "src/main.S") + +target_link_libraries("snake.s" PRIVATE "snake.core") + install(TARGETS "snake.s") + +if(SNAKE_BUILD_TESTS) + add_subdirectory("tests") +endif()
\ No newline at end of file |
