summaryrefslogtreecommitdiffstats
path: root/Source/cmVSSetupHelper.cxx
diff options
context:
space:
mode:
authorJustin Goshi <jgoshi@microsoft.com>2020-06-02 19:46:07 (GMT)
committerBrad King <brad.king@kitware.com>2020-06-03 12:58:29 (GMT)
commit8a7ad923a89030e63e60fb333169abd258732615 (patch)
treeb8c62fad79ab772ab0715aef561abcf18ac8799e /Source/cmVSSetupHelper.cxx
parent35a192788f3a32c56fb5f9b66e097d698e4d03da (diff)
downloadCMake-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.cxx14
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();