From 9a20578daf66a4eaa7add6da6f3e64f3c9b5fc3e Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 26 Nov 2018 19:02:30 +0100 Subject: [PATCH] Build: Fix ASan on OS X --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index acc146df6..13f278ef1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,6 +118,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STRE if (SLIC3R_ASAN) add_compile_options(-fsanitize=address -fno-omit-frame-pointer) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address") + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lasan") endif ()