Add variable CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY

Add CMake variable `CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY` to enable
option `DEPENDS_EXPLICIT_ONLY` on all uses of `add_custom_command`.

Fixes: #17097
This commit is contained in:
Abdelmaged Khalifa
2023-02-17 15:11:01 +02:00
parent 51c7917072
commit ea2a05f402
8 changed files with 71 additions and 11 deletions

View File

@@ -49,7 +49,8 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
bool append = false;
bool uses_terminal = false;
bool command_expand_lists = false;
bool depends_explicit_only = false;
bool depends_explicit_only =
mf.IsOn("CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY");
std::string implicit_depends_lang;
cmImplicitDependsList implicit_depends;