mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
cmake-gui: Support configure presets version 3+ without generator field
Presets allow this since commit 06e6981336
(cmake-presets: Make
generator and binaryDir fields optional, 2021-03-26, v3.21.0-rc1~346^2).
Fixes: #25817
This commit is contained in:

committed by
Brad King

parent
4d21b9e6d8
commit
18f1f19c82
@@ -589,11 +589,12 @@ void QCMake::loadPresets()
|
||||
preset.setToolset = !p.ToolsetStrategy ||
|
||||
p.ToolsetStrategy == cmCMakePresetsGraph::ArchToolsetStrategy::Set;
|
||||
preset.enabled = it.Expanded && it.Expanded->ConditionResult &&
|
||||
std::find_if(this->AvailableGenerators.begin(),
|
||||
this->AvailableGenerators.end(),
|
||||
[&p](cmake::GeneratorInfo const& g) {
|
||||
return g.name == p.Generator;
|
||||
}) != this->AvailableGenerators.end();
|
||||
((p.OriginFile->Version >= 3 && p.Generator.empty()) ||
|
||||
std::find_if(this->AvailableGenerators.begin(),
|
||||
this->AvailableGenerators.end(),
|
||||
[&p](cmake::GeneratorInfo const& g) {
|
||||
return g.name == p.Generator;
|
||||
}) != this->AvailableGenerators.end());
|
||||
presets.push_back(preset);
|
||||
}
|
||||
emit this->presetsChanged(presets);
|
||||
|
Reference in New Issue
Block a user