Build: Fix broken full build on Linux/ASAN
Before this commit building only the full version of Elektra
(`BUILD_FULL`) with `clang` would not work if we enabled ASAN.
@@ -97,7 +97,7 @@ endif ()
if (ENABLE_ASAN)
set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer")
- if (NOT APPLE AND CMAKE_COMPILER_IS_GNUCXX)
+ if (NOT (APPLE OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" AND "${CMAKE_C_COMPILER_VERSION}" VERSION_GREATER "4.0")))
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
