summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-01 11:41:32 -0400
committerBrad King <brad.king@kitware.com>2019-10-01 11:41:32 -0400
commitf695b6b3bb0347ec47e6457d330237920d6e7cf7 (patch)
treec526e827ea6e08b2a582d05bac9abb159776737b
parent6fb747a01c27a2226fe4cbf77bc19e6d21286f81 (diff)
parent5117389931e1c845d81a9b50382d42e0cfb46bdc (diff)
downloadcmake-f695b6b3bb0347ec47e6457d330237920d6e7cf7.tar.gz
Merge branch 'vs-v142-version' into release-3.15
Merge-request: !3874
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake8
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.cxx4
2 files changed, 10 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 02bc14bd9e..d9002fb0ed 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -284,7 +284,13 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
set(id_cl icl.exe)
endif()
if(CMAKE_VS_PLATFORM_TOOLSET_VERSION)
- set(id_toolset_version_props "<Import Project=\"${CMAKE_GENERATOR_INSTANCE}\\VC\\Auxiliary\\Build\\${CMAKE_VS_PLATFORM_TOOLSET_VERSION}\\Microsoft.VCToolsVersion.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}.props\" />")
+ if(CMAKE_VS_PLATFORM_TOOLSET_VERSION VERSION_GREATER_EQUAL "14.20")
+ set(id_sep ".")
+ else()
+ set(id_sep "\\")
+ 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)
endif()
endif()
else()
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
index 2ba1affde0..1eca1f6003 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -390,7 +390,9 @@ std::string cmGlobalVisualStudioVersionedGenerator::GetAuxiliaryToolset() const
GetVSInstance(instancePath);
std::stringstream path;
path << instancePath;
- path << "/VC/Auxiliary/Build/";
+ path << "/VC/Auxiliary/Build";
+ path << (cmSystemTools::VersionCompareGreaterEq(version, "14.20") ? '.'
+ : '/');
path << version;
path << "/Microsoft.VCToolsVersion." << version << ".props";