diff options
author | Quincey Koziol <koziol@lbl.gov> | 2021-08-31 14:26:02 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@lbl.gov> | 2021-08-31 14:26:02 (GMT) |
commit | 93675a15f22d65f4892df8fb9ea05b653001429c (patch) | |
tree | 46e439cff9615f52c0ebbf4a2557667e134932bd /config/sanitizer/sanitizers.cmake | |
parent | 929736cfb04df132e60df98c772db0db17dc0306 (diff) | |
parent | 01fe2549a36d7635b2cbe6f6a57cbcce29c1335b (diff) | |
download | hdf5-93675a15f22d65f4892df8fb9ea05b653001429c.zip hdf5-93675a15f22d65f4892df8fb9ea05b653001429c.tar.gz hdf5-93675a15f22d65f4892df8fb9ea05b653001429c.tar.bz2 |
Merge branch 'develop' into post_open_fix
Diffstat (limited to 'config/sanitizer/sanitizers.cmake')
-rw-r--r-- | config/sanitizer/sanitizers.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/config/sanitizer/sanitizers.cmake b/config/sanitizer/sanitizers.cmake index 0803279..58c4050 100644 --- a/config/sanitizer/sanitizers.cmake +++ b/config/sanitizer/sanitizers.cmake @@ -33,10 +33,10 @@ if(USE_SANITIZER) if(INTEL_CLANG OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang") set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - append("-fno-omit-frame-pointer" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS) - message(STATUS "Building with sanitize, base flags=${CMAKE_C_SANITIZER_FLAGS}") - if(UNIX) + append("-fno-omit-frame-pointer" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS) + message(STATUS "Building with sanitize, base flags=${CMAKE_C_SANITIZER_FLAGS}") + if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG") append("-O1" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS) endif() @@ -83,7 +83,7 @@ if(USE_SANITIZER) elseif(MSVC) if(USE_SANITIZER MATCHES "([Aa]ddress)") message(STATUS "Building with Address sanitizer") - append("-fsanitize=address" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS) + append("/fsanitize=address" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS) else() message(FATAL_ERROR "This sanitizer not yet supported in the MSVC environment: ${USE_SANITIZER}") endif() |