diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2021-06-16 14:39:39 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2021-06-16 14:39:39 (GMT) |
commit | c017098d4d06ba114085ba7de47b99fc0b71e8d0 (patch) | |
tree | eabd3fa444c96599d490b12ab49cbccda21866d3 /Source/cmState.cxx | |
parent | a9ff600a509d6af1c25f482e1ce0184c97dd3f54 (diff) | |
download | CMake-c017098d4d06ba114085ba7de47b99fc0b71e8d0.zip CMake-c017098d4d06ba114085ba7de47b99fc0b71e8d0.tar.gz CMake-c017098d4d06ba114085ba7de47b99fc0b71e8d0.tar.bz2 |
CMake: Allow override of unexpected non-flow-control commands
Fixes: #22310
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r-- | Source/cmState.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx index d97762b..929b0fb 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -480,7 +480,7 @@ void cmState::AddDisallowedCommand(std::string const& name, void cmState::AddUnexpectedCommand(std::string const& name, const char* error) { - this->AddFlowControlCommand( + this->AddBuiltinCommand( name, [name, error](std::vector<cmListFileArgument> const&, cmExecutionStatus& status) -> bool { @@ -495,6 +495,13 @@ void cmState::AddUnexpectedCommand(std::string const& name, const char* error) }); } +void cmState::AddUnexpectedFlowControlCommand(std::string const& name, + const char* error) +{ + this->FlowControlCommands.insert(name); + this->AddUnexpectedCommand(name, error); +} + bool cmState::AddScriptedCommand(std::string const& name, BT<Command> command, cmMakefile& mf) { |