aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-15 10:42:51 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-15 10:53:29 -0400
commit92f2b2c6f333f8f0ef7686e34d51a24a74dad49d (patch)
treed7681f2ae7755a84f3b1498a3dda070586d0ddc5
parent87779a8c85eec0b71703ed3090a3949761396a15 (diff)
downloadstasis-92f2b2c6f333f8f0ef7686e34d51a24a74dad49d.tar.gz
-rw-r--r--.github/workflows/cmake-multi-platform.yml22
-rw-r--r--CMakeLists.txt4
2 files changed, 18 insertions, 8 deletions
diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml
index e3f0ce7..57ac65d 100644
--- a/.github/workflows/cmake-multi-platform.yml
+++ b/.github/workflows/cmake-multi-platform.yml
@@ -60,14 +60,19 @@ jobs:
libzip
- name: Configure CMake
- run: >
- cmake -B ${{ steps.strings.outputs.build-output-dir }}
- -DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- -DTESTS=ON
- -DTESTS_VERBOSE=ON
- -DTESTS_RT=ON
- -DDEBUG_MESSAGES=ON
+ run: |
+ maybe_asan=""
+ if [[ "${RUNNER_OS}" == "Linux" ]]; then
+ maybe_asan="-DASAN=ON"
+ fi
+ cmake -B ${{ steps.strings.outputs.build-output-dir }} \
+ -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
+ ${maybe_asan} \
+ -DTESTS=ON \
+ -DTESTS_VERBOSE=ON \
+ -DTESTS_RT=ON \
+ -DDEBUG_MESSAGES=ON \
-S ${{ github.workspace }}
- name: Build
@@ -80,3 +85,4 @@ jobs:
run: ctest --build-config ${{ matrix.build_type }} --output-on-failure --output-junit results.xml --test-output-size-passed 65536 --test-output-size-failed 65536
env:
STASIS_SYSCONFDIR: ../../..
+ ASAN_OPTIONS: "verify_asan_link_order=0 strict_string_checks=1 detect_stack_use_after_return=1 detect_leaks=1"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 71e310b..fc403ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,9 +10,13 @@ find_package(CURL)
option(ASAN "Address Analyzer" OFF)
set(ASAN_OPTIONS "-fsanitize=address,null,undefined")
+message(CHECK_START "Enable Address Analyzer (ASAN)")
if (ASAN)
+ message(CHECK_PASS "Yes")
add_compile_options(${ASAN_OPTIONS} -fno-omit-frame-pointer -g -O0)
add_link_options(${ASAN_OPTIONS})
+else()
+ message(CHECK_FAIL "No")
endif()
pkg_check_modules(ZIP libzip)