aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2025-02-04 13:06:11 -0500
committerGitHub <noreply@github.com>2025-02-04 13:06:11 -0500
commit89bd28eb5ac263d1753021f25e1bc62f48e7008d (patch)
tree622918f9a81723b830ab8bcc403154271932b591 /CMakeLists.txt
parent2372e40c40ef7bc85176d8998272ad75a59fcf05 (diff)
parent825aa472739775a5e2d673043f9d846df1eac924 (diff)
downloadstasis-89bd28eb5ac263d1753021f25e1bc62f48e7008d.tar.gz
Merge pull request #86 from jhunkeler/memfixes
ASAN: Fix leaks
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d21a553..76b7186 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,13 @@ set(win_cflags /Wall)
set(CMAKE_C_STANDARD 99)
find_package(LibXml2)
find_package(CURL)
+
+option(ASAN OFF)
+if (ASAN)
+ add_compile_options(-fsanitize=address)
+ add_link_options(-fsanitize=address)
+endif()
+
link_libraries(CURL::libcurl)
link_libraries(LibXml2::LibXml2)
include_directories(${LIBXML2_INCLUDE_DIR})