diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-02-25 11:50:01 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-02-26 10:31:45 +0100 |
commit | 728729592fc1864b46c6294cb5cf61f16ba04cd2 (patch) | |
tree | 0f7aac5d0ca738020a587028ad033317ffa7fc1c /CMakeLists.txt | |
parent | f58b017f876ad26ed8e16fac86c6bf09445d65c6 (diff) | |
download | ouroboros-728729592fc1864b46c6294cb5cf61f16ba04cd2.tar.gz ouroboros-728729592fc1864b46c6294cb5cf61f16ba04cd2.zip |
build: Enable debug symbols for debug builds
This sets the "-g" compiler flag if the build is not "Release" so that
the sanitizers correctly display line numbers in their output.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8421199b..0bbddd1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,6 +86,8 @@ test_and_set_c_compiler_flag_global(-Wdeclaration-after-statement) test_and_set_c_compiler_flag_global(-fmax-errors=5) if (CMAKE_BUILD_TYPE STREQUAL "Release") test_and_set_c_compiler_flag_global(-O3) +else () + test_and_set_c_compiler_flag_global(-g) endif () if (CMAKE_BUILD_TYPE STREQUAL "DebugASan") test_and_set_c_compiler_flag_global(-fsanitize=address) |