mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-27 01:19:31 -05:00
Skip file-level dependencies on custom targets (#11332)
A custom command may name a target created by add_custom_target in its DEPENDS field. Treat this case as a target-level dependency only since a custom target provides no standard file on which to add a file-level dependency.
This commit is contained in:
@@ -1878,10 +1878,9 @@ bool cmLocalGenerator::GetRealDependency(const char* inName,
|
||||
break;
|
||||
case cmTarget::UTILITY:
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
// Depending on a utility target may not work but just trust
|
||||
// the user to have given a valid name.
|
||||
dep = inName;
|
||||
return true;
|
||||
// A utility target has no file on which to depend. This was listed
|
||||
// only to get the target-level dependency.
|
||||
return false;
|
||||
case cmTarget::INSTALL_FILES:
|
||||
case cmTarget::INSTALL_PROGRAMS:
|
||||
case cmTarget::INSTALL_DIRECTORY:
|
||||
|
||||
Reference in New Issue
Block a user