diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 13 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.ui | 6 | ||||
-rw-r--r-- | Source/cmFileCommand.cxx | 10 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 5 | ||||
-rw-r--r-- | Source/cmPolicies.h | 2 | ||||
-rw-r--r-- | Source/cmSeparateArgumentsCommand.cxx | 5 |
7 files changed, 25 insertions, 18 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e31bf44..e0bf0ad 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 19) -set(CMake_VERSION_PATCH 20201016) +set(CMake_VERSION_PATCH 20201019) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index acd32ec..7a04daa 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -43,6 +43,12 @@ #include "RegexExplorer.h" #include "WarningMessagesDialog.h" +namespace { +const QString PRESETS_DISABLED_TOOLTIP = + "This option is disabled because there are no available presets in " + "CMakePresets.json or CMakeUserPresets.json."; +} + QCMakeThread::QCMakeThread(QObject* p) : QThread(p) { @@ -92,6 +98,7 @@ CMakeSetupDialog::CMakeSetupDialog() this->ProgressBar->reset(); this->RemoveEntry->setEnabled(false); this->AddEntry->setEnabled(false); + this->Preset->setStatusTip(PRESETS_DISABLED_TOOLTIP); QByteArray p = settings.value("SplitterSizes").toByteArray(); this->Splitter->restoreState(p); @@ -696,8 +703,8 @@ void CMakeSetupDialog::updatePresets(const QVector<QCMakePreset>& presets) this->Preset->blockSignals(false); } - this->Preset->setHidden(presets.isEmpty()); - this->PresetLabel->setHidden(presets.isEmpty()); + this->Preset->setDisabled(presets.isEmpty()); + this->Preset->setToolTip(presets.isEmpty() ? PRESETS_DISABLED_TOOLTIP : ""); if (!this->DeferredPreset.isNull()) { this->Preset->setPresetName(this->DeferredPreset); @@ -823,7 +830,7 @@ void CMakeSetupDialog::setEnabledState(bool enabled) this->CacheValues->cacheModel()->setEditEnabled(enabled); this->SourceDirectory->setEnabled(enabled); this->BrowseSourceDirectoryButton->setEnabled(enabled); - this->Preset->setEnabled(enabled); + this->Preset->setEnabled(enabled && !this->Preset->presets().isEmpty()); this->BinaryDirectory->setEnabled(enabled); this->BrowseBinaryDirectoryButton->setEnabled(enabled); this->ReloadCacheAction->setEnabled(enabled); diff --git a/Source/QtDialog/CMakeSetupDialog.ui b/Source/QtDialog/CMakeSetupDialog.ui index afb25eb..a5c35b1 100644 --- a/Source/QtDialog/CMakeSetupDialog.ui +++ b/Source/QtDialog/CMakeSetupDialog.ui @@ -68,7 +68,11 @@ </widget> </item> <item row="1" column="1"> - <widget class="QCMakePresetComboBox" name="Preset"/> + <widget class="QCMakePresetComboBox" name="Preset"> + <property name="enabled"> + <bool>false</bool> + </property> + </widget> </item> <item row="2" column="0"> <widget class="QLabel" name="BinaryLabel"> diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 4fe5901..cd440ad 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2989,15 +2989,7 @@ bool HandleConfigureCommand(std::vector<std::string> const& args, std::string outputFile = cmSystemTools::CollapseFullPath( args[2], status.GetMakefile().GetCurrentBinaryDirectory()); - std::string::size_type pos = input.find_first_of("<>"); - if (pos != std::string::npos) { - status.SetError(cmStrCat("CONFIGURE called with CONTENT containing a \"", - input[pos], - "\". This character is not allowed.")); - return false; - } - - pos = outputFile.find_first_of("<>"); + std::string::size_type pos = outputFile.find_first_of("<>"); if (pos != std::string::npos) { status.SetError(cmStrCat("CONFIGURE called with OUTPUT containing a \"", outputFile[pos], diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c366b48..22594bd 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3185,10 +3185,9 @@ std::vector<std::string> cmMakefile::GetGeneratorConfigs( GeneratorConfigQuery mode) const { std::vector<std::string> configs; - if (this->GetGlobalGenerator()->IsMultiConfig() || - mode == cmMakefile::OnlyMultiConfig) { + if (this->GetGlobalGenerator()->IsMultiConfig()) { this->GetDefExpandList("CMAKE_CONFIGURATION_TYPES", configs); - } else { + } else if (mode != cmMakefile::OnlyMultiConfig) { const std::string& buildType = this->GetSafeDefinition("CMAKE_BUILD_TYPE"); if (!buildType.empty()) { configs.emplace_back(buildType); diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 99bac98..5ef0ff7 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -327,7 +327,7 @@ class cmMakefile; "add_test() supports arbitrary characters in test names.", 3, 19, 0, \ cmPolicies::WARN) \ SELECT(POLICY, CMP0111, \ - "An imported target with a missing location fails during " \ + "An imported target missing its location property fails during " \ "generation.", \ 3, 19, 0, cmPolicies::WARN) \ SELECT(POLICY, CMP0112, \ diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx index 7e501a2..52b1a44 100644 --- a/Source/cmSeparateArgumentsCommand.cxx +++ b/Source/cmSeparateArgumentsCommand.cxx @@ -80,6 +80,11 @@ bool cmSeparateArgumentsCommand(std::vector<std::string> const& args, return false; } + if (unparsedArguments.empty()) { + status.GetMakefile().AddDefinition(var, {}); + return true; + } + std::string& command = unparsedArguments.front(); if (command.empty()) { |