CMP0153: Add suggestion to use execute_process()

This commit is contained in:
Kyle Edwards
2023-10-27 09:43:18 -04:00
parent 8313d26198
commit d3cc815c98
3 changed files with 9 additions and 4 deletions

View File

@@ -219,9 +219,11 @@ void GetScriptingCommands(cmState* state)
state->AddDisallowedCommand(
"use_mangled_mesa", cmUseMangledMesaCommand, cmPolicies::CMP0030,
"The use_mangled_mesa command should not be called; see CMP0030.");
state->AddDisallowedCommand(
"exec_program", cmExecProgramCommand, cmPolicies::CMP0153,
"The exec_program command should not be called; see CMP0153.");
state->AddDisallowedCommand("exec_program", cmExecProgramCommand,
cmPolicies::CMP0153,
"The exec_program command should not be called; "
"see CMP0153. Use execute_process() instead.",
"Use execute_process() instead.");
#endif
}

View File

@@ -1,3 +1,4 @@
^CMake Error at [^
]*/Tests/RunCMake/CMP0153/CMP0153-NEW\.cmake:[0-9]+ \(exec_program\):
The exec_program command should not be called; see CMP0153\.$
The exec_program command should not be called; see CMP0153\. Use
execute_process\(\) instead\.$

View File

@@ -3,4 +3,6 @@
Policy CMP0153 is not set: The exec_program command should not be called\.
Run "cmake --help-policy CMP0153" for policy details\. Use the cmake_policy
command to set the policy and suppress this warning\.
Use execute_process\(\) instead\.
This warning is for project developers\. Use -Wno-dev to suppress it\.$