aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-10-27 08:46:29 -0400
committerLibravatar GitHub <noreply@github.com>2017-10-27 08:46:29 -0400
commitc57f68566a52d12f0fbfdfcfcfbf76aad861eb24 (patch)
tree52452b66a97098bb1d879c45d71ac514105ca1d2 /CMakeLists.txt
parentMerge pull request #1438 from mariusor/explicit_json-c_version (diff)
parentAdd Address Sanitized build type (diff)
downloadsway-c57f68566a52d12f0fbfdfcfcfbf76aad861eb24.tar.gz
sway-c57f68566a52d12f0fbfdfcfcfbf76aad861eb24.tar.zst
sway-c57f68566a52d12f0fbfdfcfcfbf76aad861eb24.zip
Merge pull request #1436 from dlrobertson/add_asan_build
Add Address Sanitized build type
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf37d9df..bf373280 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,17 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
9set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) 9set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
10add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Werror) 10add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Werror)
11 11
12# Add Address Sanitiezed build type
13set(CMAKE_C_FLAGS_ASAN
14 "${CMAKE_C_FLAGS_DEBUG} -fsanitize=address -fno-omit-frame-pointer"
15 CACHE STRING "Flags used by the C compiler during address sanitizer builds."
16 FORCE )
17mark_as_advanced(
18 CMAKE_C_FLAGS_ASAN
19 CMAKE_EXE_LINKER_FLAGS_DEBUG
20 CMAKE_SHARED_LINKER_FLAGS_DEBUG
21 )
22
12list(INSERT CMAKE_MODULE_PATH 0 23list(INSERT CMAKE_MODULE_PATH 0
13 ${CMAKE_CURRENT_SOURCE_DIR}/CMake 24 ${CMAKE_CURRENT_SOURCE_DIR}/CMake
14 ) 25 )