aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2024-04-25 05:11:39 +0200
committerEgor Tensin <egor@tensin.name>2024-04-25 05:43:13 +0200
commit8e652dd2cb69928ea1596aa3e59845fef6854e2c (patch)
tree62c827fde628593192dec56fbaeb2bb243d96414 /src
parentMakefile: separate shortcuts for debug & release builds (diff)
downloadcimple-8e652dd2cb69928ea1596aa3e59845fef6854e2c.tar.gz
cimple-8e652dd2cb69928ea1596aa3e59845fef6854e2c.zip
add a target to build w/ -fanalyzerHEADmaster
Diffstat (limited to '')
-rw-r--r--src/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ca19416..7bd8e78 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -9,6 +9,11 @@ if(COVERAGE)
add_link_options(--coverage)
endif()
+option(STATIC_ANALYZER "Enable static analysis")
+if(STATIC_ANALYZER)
+ add_compile_options(-fanalyzer)
+endif()
+
# Valgrind on Ubuntu Focal doesn't like DWARF version 5 debug info generated
# by Clang 14.
if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")