diff options
author | Brad King <brad.king@kitware.com> | 2018-05-30 14:18:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-05-30 14:19:21 (GMT) |
commit | 958191a95c9d06c0efa9240d0e98ada429e9bc3f (patch) | |
tree | 329c70681bd6591e964ef0bbcb1380d8ad8c2126 /Source/cmGlobalVisualStudio15Generator.cxx | |
parent | fdb9d1ba042fb517da0bf03a3781dd7a3b506f69 (diff) | |
parent | 5f1316841944198037d6463d3ddd12efcfae45b3 (diff) | |
download | CMake-958191a95c9d06c0efa9240d0e98ada429e9bc3f.zip CMake-958191a95c9d06c0efa9240d0e98ada429e9bc3f.tar.gz CMake-958191a95c9d06c0efa9240d0e98ada429e9bc3f.tar.bz2 |
Merge topic 'vs-toolset-version'
5f13168419 VS: Add option to select the version of the toolset used by VS 2017
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Francisco Facioni <fran6co@gmail.com>
Merge-request: !2093
Diffstat (limited to 'Source/cmGlobalVisualStudio15Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio15Generator.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index 014d93d..6af5793 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -158,6 +158,25 @@ bool cmGlobalVisualStudio15Generator::GetVSInstance(std::string& dir) const return vsSetupAPIHelper.GetVSInstanceInfo(dir); } +std::string cmGlobalVisualStudio15Generator::GetAuxiliaryToolset() const +{ + const char* version = this->GetPlatformToolsetVersion(); + if (version) { + std::string instancePath; + GetVSInstance(instancePath); + std::stringstream path; + path << instancePath; + path << "/VC/Auxiliary/Build/"; + path << version; + path << "/Microsoft.VCToolsVersion." << version << ".props"; + + std::string toolsetPath = path.str(); + cmSystemTools::ConvertToUnixSlashes(toolsetPath); + return toolsetPath; + } + return {}; +} + bool cmGlobalVisualStudio15Generator::InitializeWindows(cmMakefile* mf) { // If the Win 8.1 SDK is installed then we can select a SDK matching |