summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-07-07 13:27:34 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-07-07 13:27:45 (GMT)
commit4564c5a77ebd721144411404c69d45ab34b9722d (patch)
treeb5faa7057676d002dcefc6cbe07daf2ce5853abe /Source
parent19cd773c44d645a0a98ea5f58ffb0ce292622ec6 (diff)
parentd9a3c9fad52a522da0dcc8093770fb9e59a1e21e (diff)
downloadCMake-4564c5a77ebd721144411404c69d45ab34b9722d.zip
CMake-4564c5a77ebd721144411404c69d45ab34b9722d.tar.gz
CMake-4564c5a77ebd721144411404c69d45ab34b9722d.tar.bz2
Merge topic 'cmake-presets-list-no-generator' into release-3.21
d9a3c9fad5 CMakePresets.json: Make --list-presets show presets with no generator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6314
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 14f66d9..73f5ad5 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;
};