diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-02-06 15:25:45 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-02-06 20:04:16 (GMT) |
commit | 480b3637243d89f59906bee794ababc7cecc220e (patch) | |
tree | c14a914f856fb87b3307b0867b80da7cd37f572f /Source/cmPolicies.h | |
parent | dad1234ba11893d44ce0e0e9bf821126ae7d9590 (diff) | |
download | CMake-480b3637243d89f59906bee794ababc7cecc220e.zip CMake-480b3637243d89f59906bee794ababc7cecc220e.tar.gz CMake-480b3637243d89f59906bee794ababc7cecc220e.tar.bz2 |
cmCustomCommand: Refactor custom command-specific policy values
Many custom commands are created by CMake itself rather than by
the user. These custom commands should always have their policies
set to NEW, and user-created custom commands should have their
policy values set only from the state snapshot. In addition, we
want to genericize the mechanism of recording a policy at the time
of custom command creation.
Add a CM_FOR_EACH_CUSTOM_COMMAND_POLICY macro to genericize
custom command policies. Use this to define all custom command
policies. Make all such policies NEW instead of WARN by default.
Remove individual policy modifier methods and add a single method
that records relevant values from a cmStateSnapshot. Remove the
no longer needed explicit policy settings from synthesized custom
commands.
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r-- | Source/cmPolicies.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index fa24f57..568eca3 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -474,6 +474,8 @@ class cmMakefile; F(CMP0131) \ F(CMP0142) +#define CM_FOR_EACH_CUSTOM_COMMAND_POLICY(F) F(CMP0116) + /** \class cmPolicies * \brief Handles changes in CMake behavior and policies * |