diff options
author | Justin Goshi <jgoshi@microsoft.com> | 2020-06-02 19:46:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-03 12:58:29 (GMT) |
commit | 8a7ad923a89030e63e60fb333169abd258732615 (patch) | |
tree | b8c62fad79ab772ab0715aef561abcf18ac8799e /Source/cmVSSetupHelper.cxx | |
parent | 35a192788f3a32c56fb5f9b66e097d698e4d03da (diff) | |
download | CMake-8a7ad923a89030e63e60fb333169abd258732615.zip CMake-8a7ad923a89030e63e60fb333169abd258732615.tar.gz CMake-8a7ad923a89030e63e60fb333169abd258732615.tar.bz2 |
VS: Extract instance version from VS Installer
Diffstat (limited to 'Source/cmVSSetupHelper.cxx')
-rw-r--r-- | Source/cmVSSetupHelper.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx index dd9f058..9626599 100644 --- a/Source/cmVSSetupHelper.cxx +++ b/Source/cmVSSetupHelper.cxx @@ -258,6 +258,20 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo(std::string& vsInstallLocation) return isInstalled; } +bool cmVSSetupAPIHelper::GetVSInstanceVersion( + unsigned long long& vsInstanceVersion) +{ + vsInstanceVersion = 0; + bool isInstalled = this->EnumerateAndChooseVSInstance(); + + if (isInstalled) { + vsInstanceVersion = + static_cast<unsigned long long>(chosenInstanceInfo.ullVersion); + } + + return isInstalled; +} + bool cmVSSetupAPIHelper::GetVCToolsetVersion(std::string& vsToolsetVersion) { vsToolsetVersion.clear(); |