summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-12-12 16:38:15 (GMT)
committerBrad King <brad.king@kitware.com>2019-12-12 16:38:15 (GMT)
commitb3a536e726a601b2f17aaad14fee6cb0e215450a (patch)
treec5a53a559db3a689c63514a75d546b8f24d7ae80 /Modules
parent2ed1d2cfa3f209e9db2e8aa25411f87f3e4889b3 (diff)
parent07612646fe28d86330cbd4db9cfd27be1d8fb90f (diff)
downloadCMake-b3a536e726a601b2f17aaad14fee6cb0e215450a.zip
CMake-b3a536e726a601b2f17aaad14fee6cb0e215450a.tar.gz
CMake-b3a536e726a601b2f17aaad14fee6cb0e215450a.tar.bz2
Merge branch 'backport-3.15-vs-v142-version' into release-3.15
Merge-request: !4133
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index d9002fb..edbc23b 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -284,10 +284,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)