summaryrefslogtreecommitdiffstats
path: root/config/toolchain/clang.cmake
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-08-16 13:05:25 (GMT)
committerGitHub <noreply@github.com>2021-08-16 13:05:25 (GMT)
commit6968906418f9ecfc383ad960c975e65a504743b7 (patch)
treebc342220aa0bd9c0e5d9debe12a12e150015d9be /config/toolchain/clang.cmake
parentc0f1db4b96d43cd2f7bcd0134e107061e866d6e3 (diff)
downloadhdf5-6968906418f9ecfc383ad960c975e65a504743b7.zip
hdf5-6968906418f9ecfc383ad960c975e65a504743b7.tar.gz
hdf5-6968906418f9ecfc383ad960c975e65a504743b7.tar.bz2
Fix clang/sanitizer for windows (#883)
* Fix clang/sanitizer for windows * Restrict MSVC version for sanitize
Diffstat (limited to 'config/toolchain/clang.cmake')
-rw-r--r--config/toolchain/clang.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/config/toolchain/clang.cmake b/config/toolchain/clang.cmake
index 5e3b13a..af176aa 100644
--- a/config/toolchain/clang.cmake
+++ b/config/toolchain/clang.cmake
@@ -3,8 +3,13 @@
set(CMAKE_COMPILER_VENDOR "clang")
-set(CMAKE_C_COMPILER clang)
-set(CMAKE_CXX_COMPILER clang++)
+if(WIN32)
+ set(CMAKE_C_COMPILER clang-cl)
+ set(CMAKE_CXX_COMPILER clang-cl)
+else()
+ set(CMAKE_C_COMPILER clang)
+ set(CMAKE_CXX_COMPILER clang++)
+endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# the following is used if cross-compiling