aboutsummaryrefslogtreecommitdiff
path: root/modules/ECMEnableSanitizers.cmake
diff options
context:
space:
mode:
authorAdam Reichold <adam.reichold@t-online.de>2018-10-12 18:55:05 +0200
committerAlbert Astals Cid <aacid@kde.org>2018-10-12 18:55:05 +0200
commit1f056a36160a2a6d314c9ca3abb8a68afbeac2d8 (patch)
tree47e6f21313cab415289abb2933ada51f2a51028a /modules/ECMEnableSanitizers.cmake
parent05bd97492704029647d442d0f83acb9e6436ed53 (diff)
downloadextra-cmake-modules-1f056a36160a2a6d314c9ca3abb8a68afbeac2d8.tar.gz
extra-cmake-modules-1f056a36160a2a6d314c9ca3abb8a68afbeac2d8.tar.bz2
Add support for the fuzzer sanitizer
Diffstat (limited to 'modules/ECMEnableSanitizers.cmake')
-rw-r--r--modules/ECMEnableSanitizers.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/ECMEnableSanitizers.cmake b/modules/ECMEnableSanitizers.cmake
index 06cc0b66..9a77c6f1 100644
--- a/modules/ECMEnableSanitizers.cmake
+++ b/modules/ECMEnableSanitizers.cmake
@@ -40,6 +40,7 @@
# - thread
# - leak
# - undefined
+# - fuzzer
#
# The sanitizers "address", "memory" and "thread" are mutually exclusive. You
# cannot enable two of them in the same build.
@@ -140,6 +141,9 @@ macro (enable_sanitizer_flags sanitize_option)
elseif (${sanitize_option} MATCHES "undefined")
check_compiler_version("4.9" "3.1")
set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls")
+ elseif (${sanitize_option} MATCHES "fuzzer")
+ check_compiler_version("99.99" "6.0")
+ set(XSAN_COMPILE_FLAGS "-fsanitize=fuzzer")
else ()
message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.")
endif ()