mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 05:39:57 -05:00
cmState: Prohibit override of flow control commands
This commit is contained in:
@@ -171,8 +171,11 @@ bool cmMacroFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
|
||||
f.Functions = std::move(functions);
|
||||
f.FilePath = this->GetStartingContext().FilePath;
|
||||
mf.RecordPolicies(f.Policies);
|
||||
mf.GetState()->AddScriptedCommand(this->Args[0], std::move(f));
|
||||
return true;
|
||||
return mf.GetState()->AddScriptedCommand(
|
||||
this->Args[0],
|
||||
BT<cmState::Command>(std::move(f),
|
||||
mf.GetBacktrace().Push(this->GetStartingContext())),
|
||||
mf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user