diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:24 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:24 +0900 |
commit | e42c4abb646a39cdd5d1ccb22a9619990ce2a898 (patch) | |
tree | 5c4a99e76409f26c9525137e845d0bac7efa8c7b /Source/cmVSSetupHelper.cxx | |
parent | 07408dd83a3637a29a56a7d5fbe49f63cbb41e8f (diff) | |
download | cmake-e42c4abb646a39cdd5d1ccb22a9619990ce2a898.tar.gz cmake-e42c4abb646a39cdd5d1ccb22a9619990ce2a898.tar.bz2 cmake-e42c4abb646a39cdd5d1ccb22a9619990ce2a898.zip |
Imported Upstream version 3.12.0upstream/3.12.0
Diffstat (limited to 'Source/cmVSSetupHelper.cxx')
-rw-r--r-- | Source/cmVSSetupHelper.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx index c2f8debc8..22fe007ba 100644 --- a/Source/cmVSSetupHelper.cxx +++ b/Source/cmVSSetupHelper.cxx @@ -7,7 +7,7 @@ #include "cmsys/FStream.hxx" #ifndef VSSetupConstants -#define VSSetupConstants +# define VSSetupConstants /* clang-format off */ const IID IID_ISetupConfiguration = { 0x42843719, 0xDB4C, 0x46C2, @@ -199,6 +199,7 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo( if (!cmSystemTools::FileIsDirectory(vcToolsDir)) { return false; } + vsInstanceInfo.VCToolsetVersion = vcToolsVersion; } // Reboot may have been required before the product package was registered @@ -254,6 +255,18 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo(std::string& vsInstallLocation) return isInstalled; } +bool cmVSSetupAPIHelper::GetVCToolsetVersion(std::string& vsToolsetVersion) +{ + vsToolsetVersion.clear(); + bool isInstalled = this->EnumerateAndChooseVSInstance(); + + if (isInstalled) { + vsToolsetVersion = chosenInstanceInfo.VCToolsetVersion; + } + + return isInstalled && !vsToolsetVersion.empty(); +} + bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance() { bool isVSInstanceExists = false; |