summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-07-06 14:36:27 -0400
committerKyle Edwards <kyle.edwards@kitware.com>2021-07-06 14:36:27 -0400
commitd9a3c9fad52a522da0dcc8093770fb9e59a1e21e (patch)
tree0dbc142a1ed538c29a927bf8bd07cca4ff982832 /Source
parent13fa9701490a872effc21f13f3e1c65ca30c71e3 (diff)
downloadcmake-d9a3c9fad52a522da0dcc8093770fb9e59a1e21e.tar.gz
CMakePresets.json: Make --list-presets show presets with no generator
Fixes: #22389
Diffstat (limited to 'Source')
-rw-r--r--Source/cmake.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 14f66d9e70..73f5ad5b87 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -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;
};