diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-22 20:50:42 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-22 21:04:31 (GMT) |
commit | 8aee7fdb32a7099e3e4efdf1bf0a00732ee1c46b (patch) | |
tree | 3854ce6ac00cc25aa55905af070f2b91d0569504 /Source/cmState.h | |
parent | 3a82ff6a11d643c4a5959f65ea538a3b60784a16 (diff) | |
download | CMake-8aee7fdb32a7099e3e4efdf1bf0a00732ee1c46b.zip CMake-8aee7fdb32a7099e3e4efdf1bf0a00732ee1c46b.tar.gz CMake-8aee7fdb32a7099e3e4efdf1bf0a00732ee1c46b.tar.bz2 |
cmState: Prohibit override of flow control commands
Diffstat (limited to 'Source/cmState.h')
-rw-r--r-- | Source/cmState.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmState.h b/Source/cmState.h index 2aa57e0..0744f64 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -9,6 +9,7 @@ #include <set> #include <string> #include <unordered_map> +#include <unordered_set> #include <vector> #include "cmDefinitions.h" @@ -24,6 +25,7 @@ class cmCacheManager; class cmCommand; class cmGlobVerificationManager; +class cmMakefile; class cmStateSnapshot; class cmMessenger; class cmExecutionStatus; @@ -157,10 +159,13 @@ public: std::unique_ptr<cmCommand> command); void AddBuiltinCommand(std::string const& name, Command command); void AddBuiltinCommand(std::string const& name, BuiltinCommand command); + void AddFlowControlCommand(std::string const& name, Command command); + void AddFlowControlCommand(std::string const& name, BuiltinCommand command); void AddDisallowedCommand(std::string const& name, BuiltinCommand command, cmPolicies::PolicyID policy, const char* message); void AddUnexpectedCommand(std::string const& name, const char* error); - void AddScriptedCommand(std::string const& name, Command command); + bool AddScriptedCommand(std::string const& name, BT<Command> command, + cmMakefile& mf); void RemoveBuiltinCommand(std::string const& name); void RemoveUserDefinedCommands(); std::vector<std::string> GetCommandNames() const; @@ -223,6 +228,7 @@ private: std::vector<std::string> EnabledLanguages; std::unordered_map<std::string, Command> BuiltinCommands; std::unordered_map<std::string, Command> ScriptedCommands; + std::unordered_set<std::string> FlowControlCommands; cmPropertyMap GlobalProperties; std::unique_ptr<cmCacheManager> CacheManager; std::unique_ptr<cmGlobVerificationManager> GlobVerificationManager; |