diff options
author | Mariusz PluciĆski <mplucinski@mplucinski.com> | 2016-02-17 22:51:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-03-10 14:11:36 (GMT) |
commit | 37afe00faad5cb64e666640526bdc6b5d224b853 (patch) | |
tree | 4ae18458aa5c8df0330c33eff2eb95d4a3271755 | |
parent | b19bc31277bb2e3dd75e78f64924be3955ea8c6d (diff) | |
download | CMake-37afe00faad5cb64e666640526bdc6b5d224b853.zip CMake-37afe00faad5cb64e666640526bdc6b5d224b853.tar.gz CMake-37afe00faad5cb64e666640526bdc6b5d224b853.tar.bz2 |
CMakeDetermineCompilerId: Add detection of clang.exe bundled with VS
When using a clang toolset we need to find `clang.exe` instead of
`cl.exe`.
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index feae1c4..fbfd7a9 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -157,7 +157,11 @@ Id flags: ${testflags} set(vs_version ${CMAKE_MATCH_1}) set(id_platform ${CMAKE_VS_PLATFORM_NAME}) set(id_lang "${lang}") - set(id_cl cl.exe) + if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*") + set(id_cl clang.exe) + else() + set(id_cl cl.exe) + endif() if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") set(v NsightTegra) set(ext vcxproj) |