diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-03-25 09:57:02 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-03-25 09:57:02 -0400 |
| commit | d79588bdf85b8c1514019e679c7eefbc9014edd9 (patch) | |
| tree | 8bbdbc65d04ed8399e55ff0e836d9a9cc70c9396 /CMakeLists.txt | |
| parent | 72d760a527c38d2e481f7b3204924ab53741e3a8 (diff) | |
| download | do-d79588bdf85b8c1514019e679c7eefbc9014edd9.tar.gz | |
Initial commit
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3791872 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 4.1) +project(do C) + +set(CMAKE_C_STANDARD 99) +set(ASAN "Enable address analyzer" OFF) + +if (ASAN) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address \ + -fsanitize-recover=address \ + -fsanitize-address-use-after-scope \ + -fno-omit-frame-pointer \ + -fno-inline \ + -fsanitize=undefined \ + -g -O0" + ) + + add_link_options(-fsanitize=address) + add_link_options(-lubsan) +endif() + +add_executable(do main.c + str.c + str.h) |
