CMakeDetermineCompilerId: Add detection of clang.exe bundled with VS

When using a clang toolset we need to find `clang.exe` instead of
`cl.exe`.
This commit is contained in:
Mariusz Pluciński 2016-02-17 23:51:12 +01:00 committed by Brad King
parent b19bc31277
commit 37afe00faa
1 changed files with 5 additions and 1 deletions

View File

@ -157,7 +157,11 @@ Id flags: ${testflags}
set(vs_version ${CMAKE_MATCH_1}) set(vs_version ${CMAKE_MATCH_1})
set(id_platform ${CMAKE_VS_PLATFORM_NAME}) set(id_platform ${CMAKE_VS_PLATFORM_NAME})
set(id_lang "${lang}") set(id_lang "${lang}")
if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
set(id_cl clang.exe)
else()
set(id_cl cl.exe) set(id_cl cl.exe)
endif()
if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")
set(v NsightTegra) set(v NsightTegra)
set(ext vcxproj) set(ext vcxproj)