diff options
author | Brad King <brad.king@kitware.com> | 2019-10-02 11:47:16 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-10-02 11:47:25 (GMT) |
commit | 20e9151e6cf47299bb99d85446beb5dc656dba7e (patch) | |
tree | a7e602a03aebc935cab447d0f8d54b3ed5ed53b9 | |
parent | c5bec56611d6f7534670676a81cfc9d9b920afc4 (diff) | |
parent | 5117389931e1c845d81a9b50382d42e0cfb46bdc (diff) | |
download | CMake-20e9151e6cf47299bb99d85446beb5dc656dba7e.zip CMake-20e9151e6cf47299bb99d85446beb5dc656dba7e.tar.gz CMake-20e9151e6cf47299bb99d85446beb5dc656dba7e.tar.bz2 |
Merge topic 'vs-v142-version'
5117389931 VS: Fix support for v142 toolset minor versions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3874
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 8 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioVersionedGenerator.cxx | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 40658ea..908e530 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 2ba1aff..1eca1f6 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"; |