diff options
author | Brad King <brad.king@kitware.com> | 2021-06-17 11:30:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-17 11:54:48 (GMT) |
commit | 3fd65f5ca601d38c7b2ee8c99b148df31cea1acd (patch) | |
tree | e36f7bd076f484ca5148a383fbaf4aeec8d2d673 /Source/cmGlobalVisualStudio10Generator.cxx | |
parent | c92595be1d7c0ae3cd4ea8ff0ce27ede37f676e8 (diff) | |
download | CMake-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/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index fa51092..6ce82f4 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -1361,10 +1361,10 @@ static unsigned int cmLoadFlagTableSpecial(Json::Value entry, namespace { -unsigned long long const vsVer16_10_0 = 4503644629696790; +std::string const vsVer16_10_0 = "16.10.31321.278"; -cmIDEFlagTable const* cmLoadFlagTableJson( - std::string const& flagJsonPath, cm::optional<unsigned long long> vsver) +cmIDEFlagTable const* cmLoadFlagTableJson(std::string const& flagJsonPath, + cm::optional<std::string> vsVer) { cmIDEFlagTable* ret = nullptr; auto savedFlagIterator = loadedFlagJsonFiles.find(flagJsonPath); @@ -1387,7 +1387,8 @@ cmIDEFlagTable const* cmLoadFlagTableJson( flagEntry.value = cmLoadFlagTableString(flag, "value"); flagEntry.special = cmLoadFlagTableSpecial(flag, "flags"); // FIXME: Port this version check to a Json field. - if (vsver && *vsver < vsVer16_10_0 && + if (vsVer && + !cmSystemTools::VersionCompareGreaterEq(*vsVer, vsVer16_10_0) && flagEntry.IDEName == "ExternalWarningLevel") { continue; } @@ -1466,8 +1467,8 @@ cmIDEFlagTable const* cmGlobalVisualStudio10Generator::LoadFlagTable( } } - cm::optional<unsigned long long> vsver = this->GetVSInstanceVersion(); - if (cmIDEFlagTable const* ret = cmLoadFlagTableJson(filename, vsver)) { + cm::optional<std::string> vsVer = this->GetVSInstanceVersion(); + if (cmIDEFlagTable const* ret = cmLoadFlagTableJson(filename, vsVer)) { return ret; } |