summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-12-13 15:31:32 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-12-13 15:31:41 (GMT)
commitcffd6182302cf3991eb90422a83b180a2d00cb06 (patch)
tree52d02f9a5dfa0fb0f420bb6734f37e05cd2655ba /Modules/CMakeDetermineCompilerId.cmake
parentc34d05a11e292dae01a659e857628f4e802b6466 (diff)
parent2f853eec3dc7efa9521f9df6ef03bedd6492234b (diff)
downloadCMake-cffd6182302cf3991eb90422a83b180a2d00cb06.zip
CMake-cffd6182302cf3991eb90422a83b180a2d00cb06.tar.gz
CMake-cffd6182302cf3991eb90422a83b180a2d00cb06.tar.bz2
Merge topic 'backport-3.16-vs-v142-version'
2f853eec3d Merge branch 'backport-3.15-vs-v142-version' into backport-3.16-vs-v142-version d8d4924d98 VS: Fix support for v142 toolset minor versions in VS 16.5+ 07612646fe VS: Fix support for v142 toolset minor versions in VS 16.5+ Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4133
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 002fe21..52d8976 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -288,10 +288,11 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
set(id_cl icl.exe)
endif()
if(CMAKE_VS_PLATFORM_TOOLSET_VERSION)
+ set(id_sep "\\")
if(CMAKE_VS_PLATFORM_TOOLSET_VERSION VERSION_GREATER_EQUAL "14.20")
- set(id_sep ".")
- else()
- set(id_sep "\\")
+ if(EXISTS "${CMAKE_GENERATOR_INSTANCE}/VC/Auxiliary/Build.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}/Microsoft.VCToolsVersion.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}.props")
+ set(id_sep ".")
+ endif()
endif()
set(id_toolset_version_props "<Import Project=\"${CMAKE_GENERATOR_INSTANCE}\\VC\\Auxiliary\\Build${id_sep}${CMAKE_VS_PLATFORM_TOOLSET_VERSION}\\Microsoft.VCToolsVersion.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}.props\" />")
unset(id_sep)