diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-01-19 23:31:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-19 23:31:08 (GMT) |
commit | f8578a5e5c1316009a40b2e0ce07e5316fefeba8 (patch) | |
tree | b23ee8efe12d5a1094e757102ab3aa438b6eb627 /config/sanitizer/sanitizers.cmake | |
parent | b86a704411ad5f1201db7ca5a942a4ccdb449f21 (diff) | |
download | hdf5-f8578a5e5c1316009a40b2e0ce07e5316fefeba8.zip hdf5-f8578a5e5c1316009a40b2e0ce07e5316fefeba8.tar.gz hdf5-f8578a5e5c1316009a40b2e0ce07e5316fefeba8.tar.bz2 |
Fix cmake dynamic analysis on windows (#1378)
Fix sanitizer flag form on windows
Add search paths to windows code-coverage
Diffstat (limited to 'config/sanitizer/sanitizers.cmake')
-rw-r--r-- | config/sanitizer/sanitizers.cmake | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/config/sanitizer/sanitizers.cmake b/config/sanitizer/sanitizers.cmake index 8bf1d5b..b06992f 100644 --- a/config/sanitizer/sanitizers.cmake +++ b/config/sanitizer/sanitizers.cmake @@ -83,12 +83,21 @@ 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() else() message(FATAL_ERROR "USE_SANITIZER is not supported on this platform.") endif() + 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) + else() + message(FATAL_ERROR "This sanitizer not yet supported in the MSVC environment: ${USE_SANITIZER}") + endif() + else() + message(FATAL_ERROR "USE_SANITIZER is not supported on this platform.") endif() endif() |