summaryrefslogtreecommitdiffstats
path: root/Source/cmVSSetupHelper.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-17 11:30:48 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-17 11:54:48 (GMT)
commit3fd65f5ca601d38c7b2ee8c99b148df31cea1acd (patch)
treee36f7bd076f484ca5148a383fbaf4aeec8d2d673 /Source/cmVSSetupHelper.cxx
parentc92595be1d7c0ae3cd4ea8ff0ce27ede37f676e8 (diff)
downloadCMake-3fd65f5ca601d38c7b2ee8c99b148df31cea1acd.zip
CMake-3fd65f5ca601d38c7b2ee8c99b148df31cea1acd.tar.gz
CMake-3fd65f5ca601d38c7b2ee8c99b148df31cea1acd.tar.bz2
VS: Compare VS instance versions as strings
This makes the values more readable.
Diffstat (limited to 'Source/cmVSSetupHelper.cxx')
-rw-r--r--Source/cmVSSetupHelper.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx
index 9626599..969a2c2 100644
--- a/Source/cmVSSetupHelper.cxx
+++ b/Source/cmVSSetupHelper.cxx
@@ -258,15 +258,13 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo(std::string& vsInstallLocation)
return isInstalled;
}
-bool cmVSSetupAPIHelper::GetVSInstanceVersion(
- unsigned long long& vsInstanceVersion)
+bool cmVSSetupAPIHelper::GetVSInstanceVersion(std::string& vsInstanceVersion)
{
- vsInstanceVersion = 0;
+ vsInstanceVersion.clear();
bool isInstalled = this->EnumerateAndChooseVSInstance();
if (isInstalled) {
- vsInstanceVersion =
- static_cast<unsigned long long>(chosenInstanceInfo.ullVersion);
+ vsInstanceVersion = cmsys::Encoding::ToNarrow(chosenInstanceInfo.Version);
}
return isInstalled;