From 96aa60e773ddb5fc80ad8fe6ed32731aa1bbcb0b Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Tue, 19 Aug 2014 18:22:35 +0200 Subject: [PATCH] changed flags for address sanitizer build --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4239f83..fa31df4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -671,12 +671,13 @@ endif() if (COOLPROP_CLANG_ADDRESS_SANITIZER) - SET(CMAKE_CXX_FLAGS "-fsanitize=address") + SET(CMAKE_CXX_FLAGS "-fsanitize=address -g") list(APPEND APP_SOURCES "${CMAKE_SOURCE_DIR}/src/Tests/test_main.cxx") # CATCH TEST, compile everything with catch and set test entry point add_executable (CatchTestRunner ${APP_SOURCES}) add_dependencies (CatchTestRunner generate_headers) set_target_properties (CatchTestRunner PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -DENABLE_CATCH") + set(CMAKE_EXE_LINKER_FLAGS "-fsanitize=address -lstdc++") if(UNIX) target_link_libraries (CatchTestRunner ${CMAKE_DL_LIBS}) endif()