diff options
author | Brad King <brad.king@kitware.com> | 2019-01-09 16:28:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-10 12:52:48 (GMT) |
commit | 03f74a16cde9e2e7e3433054970cc7cadd31388f (patch) | |
tree | 2ddb8d32f2492160dd3ca0a817c055abdb71a0ee /Source/cmGlobalVisualStudioGenerator.cxx | |
parent | d07f453f39b477d687dd87aad2e1cd766598b434 (diff) | |
download | CMake-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.cxx | 19 |
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()); |