diff options
| author | Adam Reichold <adam.reichold@t-online.de> | 2018-10-12 18:55:05 +0200 | 
|---|---|---|
| committer | Albert Astals Cid <aacid@kde.org> | 2018-10-12 18:55:05 +0200 | 
| commit | 1f056a36160a2a6d314c9ca3abb8a68afbeac2d8 (patch) | |
| tree | 47e6f21313cab415289abb2933ada51f2a51028a | |
| parent | 05bd97492704029647d442d0f83acb9e6436ed53 (diff) | |
| download | extra-cmake-modules-1f056a36160a2a6d314c9ca3abb8a68afbeac2d8.tar.gz extra-cmake-modules-1f056a36160a2a6d314c9ca3abb8a68afbeac2d8.tar.bz2 | |
Add support for the fuzzer sanitizer
| -rw-r--r-- | modules/ECMEnableSanitizers.cmake | 4 | 
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 () | 
