summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDFCXXCompilerFlags.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake/HDFCXXCompilerFlags.cmake')
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake9
1 files changed, 4 insertions, 5 deletions
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index a121d0a..7b10b9d 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -27,8 +27,7 @@ if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set (_INTEL_WINDOWS 1)
endif ()
-if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
- AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+if (WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
set (_CLANG_MSVC_WINDOWS 1)
endif()
@@ -140,7 +139,7 @@ else ()
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-general")
endif ()
endif ()
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
list (APPEND HDF5_CMAKE_CXX_FLAGS "-Minform=inform")
@@ -161,14 +160,14 @@ if (HDF5_ENABLE_DEV_WARNINGS)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general")
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
endif ()
else ()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general")
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
endif ()
endif ()