Skip to content

Commit 31d6383

Browse files
committed
Updated CMakeLists
1 parent cd59e9a commit 31d6383

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
cmake_minimum_required(VERSION 3.3)
1616
project(mapcode_cpp)
1717

18+
# The debug configuration adds the "address sanitizer" to check for out of bounds behavior and such.
19+
# You may wish to set the following environment variables during runtime as well:
20+
#
21+
# export ASAN_OPTIONS=verbosity=2:coverage=true:strict_string_checks=1:replace_str=true:
22+
# replace_intrin=true:detect_stack_use_after_return=true:detect_invalid_pointer_pairs=99999:
23+
# detect_container_overflow=true:detect_odr_violation=2
24+
1825
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Werror -fsanitize=address -O1 -fno-common -fno-optimize-sibling-calls -fno-omit-frame-pointer")
1926
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11")
2027
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address")

0 commit comments

Comments
 (0)