summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-18 16:08:45 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-18 17:29:53 (GMT)
commit8144b00e32cf1e24daf41353cbcd1806311ceac9 (patch)
tree9dab608492a1c0faa7f5381524ffcd7d2c88334d /Source/cmake.cxx
parentb70c0aed5c616edce5cbc803c7de92580f835f90 (diff)
downloadCMake-8144b00e32cf1e24daf41353cbcd1806311ceac9.zip
CMake-8144b00e32cf1e24daf41353cbcd1806311ceac9.tar.gz
CMake-8144b00e32cf1e24daf41353cbcd1806311ceac9.tar.bz2
Split global generator factory list with and without platforms
Replace `cmGlobalGeneratorFactory::GetGenerators` with a pair of methods to split the list of generator names into those that have platforms in the name and those that do not.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 9fcfbde..f320aff 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -959,12 +959,18 @@ void cmake::AddDefaultExtraGenerators()
#endif
}
-void cmake::GetRegisteredGenerators(
- std::vector<GeneratorInfo>& generators) const
+void cmake::GetRegisteredGenerators(std::vector<GeneratorInfo>& generators,
+ bool includeNamesWithPlatform) const
{
for (cmGlobalGeneratorFactory* gen : this->Generators) {
- std::vector<std::string> names;
- gen->GetGenerators(names);
+ std::vector<std::string> names = gen->GetGeneratorNames();
+
+ if (includeNamesWithPlatform) {
+ std::vector<std::string> namesWithPlatform =
+ gen->GetGeneratorNamesWithPlatform();
+ names.insert(names.end(), namesWithPlatform.begin(),
+ namesWithPlatform.end());
+ }
for (std::string const& name : names) {
GeneratorInfo info;