diff options
author | Sam Freed <safreed@microsoft.com> | 2020-12-14 18:06:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-02-01 16:59:40 (GMT) |
commit | 676ecf0d37cf5cfda390f52ce60babcb5da78108 (patch) | |
tree | 79129100ed585db7a91b82778166c1e1d3d6f7e5 /Source/QtDialog/QCMake.cxx | |
parent | 4f4f2028b8e2c45eb6940d1ec5069caad9b606a2 (diff) | |
download | CMake-676ecf0d37cf5cfda390f52ce60babcb5da78108.zip CMake-676ecf0d37cf5cfda390f52ce60babcb5da78108.tar.gz CMake-676ecf0d37cf5cfda390f52ce60babcb5da78108.tar.bz2 |
cmake-presets: Add build and test presets
Fixes: #21391
Diffstat (limited to 'Source/QtDialog/QCMake.cxx')
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 2f41f70..f593f83 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -68,9 +68,9 @@ QCMake::QCMake(QObject* p) connect(&this->LoadPresetsTimer, &QTimer::timeout, this, [this]() { this->loadPresets(); if (!this->PresetName.isEmpty() && - this->CMakePresetsFile.Presets.find( + this->CMakePresetsFile.ConfigurePresets.find( std::string(this->PresetName.toLocal8Bit())) == - this->CMakePresetsFile.Presets.end()) { + this->CMakePresetsFile.ConfigurePresets.end()) { this->setPreset(QString{}); } }); @@ -158,7 +158,7 @@ void QCMake::setPreset(const QString& name, bool setBinary) if (!name.isNull()) { std::string presetName(name.toLocal8Bit()); auto const& expandedPreset = - this->CMakePresetsFile.Presets[presetName].Expanded; + this->CMakePresetsFile.ConfigurePresets[presetName].Expanded; if (expandedPreset) { if (setBinary) { QString binaryDir = @@ -420,7 +420,8 @@ QCMakePropertyList QCMake::properties() const if (!this->PresetName.isNull()) { std::string presetName(this->PresetName.toLocal8Bit()); - auto const& p = this->CMakePresetsFile.Presets.at(presetName).Expanded; + auto const& p = + this->CMakePresetsFile.ConfigurePresets.at(presetName).Expanded; if (p) { for (auto const& v : p->CacheVariables) { if (!v.second) { @@ -535,8 +536,8 @@ void QCMake::loadPresets() this->LastLoadPresetsResult = result; QVector<QCMakePreset> presets; - for (auto const& name : this->CMakePresetsFile.PresetOrder) { - auto const& it = this->CMakePresetsFile.Presets[name]; + for (auto const& name : this->CMakePresetsFile.ConfigurePresetOrder) { + auto const& it = this->CMakePresetsFile.ConfigurePresets[name]; auto const& p = it.Unexpanded; if (p.Hidden) { continue; |