CMakePresets.json: Make --list-presets show presets with no generator

Fixes: #22389
This commit is contained in:
Kyle Edwards
2021-07-06 14:36:27 -04:00
parent 13fa970149
commit d9a3c9fad5
6 changed files with 23 additions and 13 deletions
+3
View File
@@ -1687,6 +1687,9 @@ void cmake::PrintPresetList(const cmCMakePresetsFile& file) const
this->GetRegisteredGenerators(generators, false);
auto filter =
[&generators](const cmCMakePresetsFile::ConfigurePreset& preset) -> bool {
if (preset.Generator.empty()) {
return true;
}
auto condition = [&preset](const GeneratorInfo& info) -> bool {
return info.name == preset.Generator;
};