Create project skeleton

This commit is contained in:
2024-11-03 19:37:07 +00:00
commit 586287dcfa
4 changed files with 47 additions and 0 deletions

16
CMakeLists.txt Normal file
View File

@@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.10)
project(maze-thing LANGUAGES C)
option(SANITIZERS "Enable undefined behaviour and address sanitizers" ON)
add_executable(maze-thing main.c)
set_property(TARGET maze-thing PROPERTY C_STANDARD 11)
set_property(TARGET maze-thing PROPERTY C_EXTENSIONS OFF)
target_compile_options(maze-thing PRIVATE -Wall -Wextra -pedantic)
if(${SANITIZERS})
target_compile_options(maze-thing PRIVATE -fsanitize=address,undefined)
target_link_options(maze-thing PRIVATE -fsanitize=address,undefined)
endif()