Build: Fix compilation with option ASAN on macOS
Before this change Elektra would not compile on macOS if we enabled the
address sanitizer by setting the CMake option `ENABLE_ASAN`.
This commit fixes
@@ -97,7 +97,9 @@ endif ()
if (ENABLE_ASAN)
set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer")
+ if (NOT APPLE)
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lubsan")
+ endif ()
set (ASAN_LIBRARY "-lasan") #this is needed for GIR to put asan in front
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
