summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog
diff options
context:
space:
mode:
authorfriendlyanon <friendlyanon_@hotmail.com>2021-03-26 12:31:43 (GMT)
committerfriendlyanon <friendlyanon_@hotmail.com>2021-04-06 23:24:44 (GMT)
commit06e69813360560347434a5320f1a366ba004e033 (patch)
tree7d73bde2c3a04079d173cbfce540d40f75413a72 /Source/QtDialog
parent46393e8977ed0aba5536e6108c78db07615616ba (diff)
downloadCMake-06e69813360560347434a5320f1a366ba004e033.zip
CMake-06e69813360560347434a5320f1a366ba004e033.tar.gz
CMake-06e69813360560347434a5320f1a366ba004e033.tar.bz2
cmake-presets: Make generator and binaryDir fields optional
In v3 of the presets, generator and buildDir can be omitted to fall back to regular cmake behavior when these values are not explicitly provided by the user. Fixes: #21987
Diffstat (limited to 'Source/QtDialog')
-rw-r--r--Source/QtDialog/QCMake.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 7d037e3..6796e25 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -160,7 +160,7 @@ void QCMake::setPreset(const QString& name, bool setBinary)
auto const& expandedPreset =
this->CMakePresetsFile.ConfigurePresets[presetName].Expanded;
if (expandedPreset) {
- if (setBinary) {
+ if (setBinary && !expandedPreset->BinaryDir.empty()) {
QString binaryDir =
QString::fromLocal8Bit(expandedPreset->BinaryDir.data());
this->setBinaryDirectory(binaryDir);