diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2021-09-24 13:06:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-24 13:06:35 (GMT) |
commit | cc7c0eb910306b3e823867e8b9bb58204f0e1422 (patch) | |
tree | 5a4500155d8b0057d979c13420b8b9dadbb6827d | |
parent | 464000505245195f57f0c5e29a909159bee303de (diff) | |
download | hdf5-cc7c0eb910306b3e823867e8b9bb58204f0e1422.zip hdf5-cc7c0eb910306b3e823867e8b9bb58204f0e1422.tar.gz hdf5-cc7c0eb910306b3e823867e8b9bb58204f0e1422.tar.bz2 |
MS clang needs EHsc flag (#1035)
-rw-r--r-- | config/cmake/HDFCXXCompilerFlags.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 7b10b9d..e76150f 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -32,9 +32,9 @@ if (WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" AND "x${CMAKE_CXX_SIMULAT endif() # MSVC 14.28 enables C5105, but the Windows SDK 10.0.18362.0 triggers it. -if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_LOADED) +if ((_CLANG_MSVC_WINDOWS OR CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") AND CMAKE_CXX_COMPILER_LOADED) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.28) + if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.28) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd5105") endif () endif () |