diff options
Diffstat (limited to 'Source/cmCustomCommand.h')
-rw-r--r-- | Source/cmCustomCommand.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index 5533847..3671ad9 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -17,6 +17,8 @@ class cmImplicitDependsList { }; +class cmStateSnapshot; + /** \class cmCustomCommand * \brief A class to encapsulate a custom command * @@ -108,9 +110,13 @@ public: const std::string& GetJobPool() const; void SetJobPool(const std::string& job_pool); - /** Set/Get the CMP0116 status (used by the Ninja generator) */ - cmPolicies::PolicyStatus GetCMP0116Status() const; - void SetCMP0116Status(cmPolicies::PolicyStatus cmp0116); +#define DECLARE_CC_POLICY_ACCESSOR(P) \ + cmPolicies::PolicyStatus Get##P##Status() const; + CM_FOR_EACH_CUSTOM_COMMAND_POLICY(DECLARE_CC_POLICY_ACCESSOR) +#undef DECLARE_CC_POLICY_ACCESSOR + + /** Record policy values from state snapshot */ + void RecordPolicyValues(const cmStateSnapshot& snapshot); /** Set/Get the associated target */ const std::string& GetTarget() const; @@ -135,5 +141,11 @@ private: bool CommandExpandLists = false; bool StdPipesUTF8 = false; bool HasMainDependency_ = false; - cmPolicies::PolicyStatus CMP0116Status = cmPolicies::WARN; + +// Policies are NEW for synthesized custom commands, and set by cmMakefile for +// user-created custom commands. +#define DECLARE_CC_POLICY_FIELD(P) \ + cmPolicies::PolicyStatus P##Status = cmPolicies::NEW; + CM_FOR_EACH_CUSTOM_COMMAND_POLICY(DECLARE_CC_POLICY_FIELD) +#undef DECLARE_CC_POLICY_FIELD }; |