diff options
author | Brad King <brad.king@kitware.com> | 2016-10-11 17:06:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-10-11 17:16:24 (GMT) |
commit | d3df00ae5330de935eafd0f315017ae0f89a6968 (patch) | |
tree | 4f84568df0e7293b2405e4ee60d4a390f5fe48ac /Source/cmake.cxx | |
parent | 10160f691c5fa6849a02383d727b30da648aa878 (diff) | |
download | CMake-d3df00ae5330de935eafd0f315017ae0f89a6968.zip CMake-d3df00ae5330de935eafd0f315017ae0f89a6968.tar.gz CMake-d3df00ae5330de935eafd0f315017ae0f89a6968.tar.bz2 |
cmake: Rename default generator selection list variable
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ed4d453..d74b7c1 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1452,12 +1452,12 @@ void cmake::CreateDefaultGlobalGenerator() vsVerions.push_back("VisualStudio\\"); vsVerions.push_back("VCExpress\\"); vsVerions.push_back("WDExpress\\"); - struct VSRegistryEntryName + struct VSVersionedGenerator { const char* MSVersion; const char* GeneratorName; }; - VSRegistryEntryName version[] = { + static VSVersionedGenerator const vsGenerators[] = { /* clang-format needs this comment to break after the opening brace */ { "7.1", "Visual Studio 7 .NET 2003" }, { "8.0", "Visual Studio 8 2005" }, @@ -1469,15 +1469,15 @@ void cmake::CreateDefaultGlobalGenerator() { "15.0", "Visual Studio 15" }, { 0, 0 } }; - for (int i = 0; version[i].MSVersion != 0; i++) { + for (int i = 0; vsGenerators[i].MSVersion != 0; i++) { for (size_t b = 0; b < vsVerions.size(); b++) { - std::string reg = vsregBase + vsVerions[b] + version[i].MSVersion; + std::string reg = vsregBase + vsVerions[b] + vsGenerators[i].MSVersion; reg += ";InstallDir"; std::string dir; if (cmSystemTools::ReadRegistryValue(reg, dir, cmSystemTools::KeyWOW64_32) && cmSystemTools::PathExists(dir)) { - found = version[i].GeneratorName; + found = vsGenerators[i].GeneratorName; break; } } |