aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeslie Zhai <xiangzhai83@gmail.com>2016-12-28 09:53:59 +0800
committerLeslie Zhai <xiangzhai83@gmail.com>2016-12-28 09:53:59 +0800
commit1e7f3d5ba91e79a47d69a48e8f991ee0e7794b53 (patch)
tree9aa61e16c08791bffa3f1a67e7c7d0c96c012ec1
parent68a819958e9c3f061cfd10ee33cab963c982d53d (diff)
downloadextra-cmake-modules-1e7f3d5ba91e79a47d69a48e8f991ee0e7794b53.tar.gz
extra-cmake-modules-1e7f3d5ba91e79a47d69a48e8f991ee0e7794b53.tar.bz2
Add Clang Sanitizer CMAKE_C_FLAGS for C project
BUG: 374195 REVIEW: 129708 Reviewers: #extracmakemodules, alexmerry Reviewed By: dfaure
-rw-r--r--modules/ECMEnableSanitizers.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/ECMEnableSanitizers.cmake b/modules/ECMEnableSanitizers.cmake
index 9c8a4dee..b8851c70 100644
--- a/modules/ECMEnableSanitizers.cmake
+++ b/modules/ECMEnableSanitizers.cmake
@@ -151,6 +151,7 @@ foreach ( CUR_SANITIZER ${ECM_ENABLE_SANITIZERS} )
string(TOLOWER ${CUR_SANITIZER} CUR_SANITIZER)
# check option and enable appropriate flags
enable_sanitizer_flags ( ${CUR_SANITIZER} )
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XSAN_COMPILE_FLAGS}" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XSAN_COMPILE_FLAGS}" )
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
link_libraries(${XSAN_LINKER_FLAGS})