summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-21 12:45:20 (GMT)
committerBrad King <brad.king@kitware.com>2019-05-21 12:50:01 (GMT)
commit639e14def6ada307c25a422a4b51f1fceaebeead (patch)
tree19b5eba01b37211b21c4fe6184f4979047e14dca /Source/cmGlobalVisualStudio10Generator.cxx
parente025495b8500f9aaf6745571ffdb48a6218e7929 (diff)
downloadCMake-639e14def6ada307c25a422a4b51f1fceaebeead.zip
CMake-639e14def6ada307c25a422a4b51f1fceaebeead.tar.gz
CMake-639e14def6ada307c25a422a4b51f1fceaebeead.tar.bz2
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.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 4fa89d0..6a78d0b 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)) {