summaryrefslogtreecommitdiffstats
path: root/Source/cmState.h
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-04-08 07:55:52 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2019-07-22 13:27:56 (GMT)
commitdfaa87f1b3335b2e80f68726fd5e1b3bbd87d667 (patch)
treed631728ba6308e21581ab455fd341d9fc92dd11d /Source/cmState.h
parent28f2d12a055e025aa0ddeb9842f204f29181eaff (diff)
downloadCMake-dfaa87f1b3335b2e80f68726fd5e1b3bbd87d667.zip
CMake-dfaa87f1b3335b2e80f68726fd5e1b3bbd87d667.tar.gz
CMake-dfaa87f1b3335b2e80f68726fd5e1b3bbd87d667.tar.bz2
cmState: Support BuiltinCommands as free functions
Diffstat (limited to 'Source/cmState.h')
-rw-r--r--Source/cmState.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmState.h b/Source/cmState.h
index 07c1c9b..8847f3b 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -145,6 +145,8 @@ public:
using Command = std::function<bool(std::vector<cmListFileArgument> const&,
cmExecutionStatus&)>;
+ using BuiltinCommand = bool (*)(std::vector<std::string> const&,
+ cmExecutionStatus&);
// Returns a command from its name, case insensitive, or nullptr
Command GetCommand(std::string const& name) const;
@@ -154,6 +156,7 @@ public:
void AddBuiltinCommand(std::string const& name,
std::unique_ptr<cmCommand> command);
void AddBuiltinCommand(std::string const& name, Command command);
+ void AddBuiltinCommand(std::string const& name, BuiltinCommand command);
void AddDisallowedCommand(std::string const& name,
std::unique_ptr<cmCommand> command,
cmPolicies::PolicyID policy, const char* message);