summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2023-02-06 15:25:45 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2023-02-06 20:04:16 (GMT)
commit480b3637243d89f59906bee794ababc7cecc220e (patch)
treec14a914f856fb87b3307b0867b80da7cd37f572f /Source/cmLocalGenerator.cxx
parentdad1234ba11893d44ce0e0e9bf821126ae7d9590 (diff)
downloadCMake-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/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx1
1 files changed, 0 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 75ec694..15bcd02 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2841,7 +2841,6 @@ void cmLocalGenerator::CopyPchCompilePdb(
auto cc = cm::make_unique<cmCustomCommand>();
cc->SetCommandLines(commandLines);
cc->SetComment(no_message);
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetStdPipesUTF8(true);
if (this->GetGlobalGenerator()->IsVisualStudio()) {