summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-09 16:28:57 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-10 12:52:48 (GMT)
commit03f74a16cde9e2e7e3433054970cc7cadd31388f (patch)
tree2ddb8d32f2492160dd3ca0a817c055abdb71a0ee /Source/cmGlobalVisualStudioGenerator.cxx
parentd07f453f39b477d687dd87aad2e1cd766598b434 (diff)
downloadCMake-03f74a16cde9e2e7e3433054970cc7cadd31388f.zip
CMake-03f74a16cde9e2e7e3433054970cc7cadd31388f.tar.gz
CMake-03f74a16cde9e2e7e3433054970cc7cadd31388f.tar.bz2
VS: Convert GetIDEVersion to non-virtual table lookup
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index da3daf8..ff53487 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -43,6 +43,25 @@ void cmGlobalVisualStudioGenerator::SetVersion(VSVersion v)
this->Version = v;
}
+const char* cmGlobalVisualStudioGenerator::GetIDEVersion() const
+{
+ switch (this->Version) {
+ case cmGlobalVisualStudioGenerator::VS9:
+ return "9.0";
+ case cmGlobalVisualStudioGenerator::VS10:
+ return "10.0";
+ case cmGlobalVisualStudioGenerator::VS11:
+ return "11.0";
+ case cmGlobalVisualStudioGenerator::VS12:
+ return "12.0";
+ case cmGlobalVisualStudioGenerator::VS14:
+ return "14.0";
+ case cmGlobalVisualStudioGenerator::VS15:
+ return "15.0";
+ }
+ return "";
+}
+
std::string cmGlobalVisualStudioGenerator::GetRegistryBase()
{
return cmGlobalVisualStudioGenerator::GetRegistryBase(this->GetIDEVersion());