diff options
author | Brad King <brad.king@kitware.com> | 2019-05-21 08:45:20 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-05-21 08:50:01 -0400 |
commit | 639e14def6ada307c25a422a4b51f1fceaebeead (patch) | |
tree | 19b5eba01b37211b21c4fe6184f4979047e14dca /Source/cmGlobalVisualStudio10Generator.cxx | |
parent | e025495b8500f9aaf6745571ffdb48a6218e7929 (diff) | |
download | cmake-639e14def6ada307c25a422a4b51f1fceaebeead.tar.gz |
VS: Factor out helper to compute ApplicationTypeRevision
This is the first two components of `CMAKE_SYSTEM_VERSION`.
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 4fa89d0dc9..6a78d0b8be 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -1112,6 +1112,15 @@ std::string cmGlobalVisualStudio10Generator::GetInstalledNsightTegraVersion() return version; } +std::string cmGlobalVisualStudio10Generator::GetApplicationTypeRevision() const +{ + // Return the first two '.'-separated components of the Windows version. + std::string::size_type end1 = this->SystemVersion.find('.'); + std::string::size_type end2 = + end1 == std::string::npos ? end1 : this->SystemVersion.find('.', end1 + 1); + return this->SystemVersion.substr(0, end2); +} + static std::string cmLoadFlagTableString(Json::Value entry, const char* field) { if (entry.isMember(field)) { |