From d79588bdf85b8c1514019e679c7eefbc9014edd9 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 25 Mar 2026 09:57:02 -0400 Subject: Initial commit --- CMakeLists.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') 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) -- cgit