BUG: Custom command depends may match sources
Custom command dependencies that are not full paths or targets may also match source files. When one does, the full information about the source file's location and name may be used. This fixes the case when a custom commands depends by relative path on a source file generated by another custom command specifying its output by relative path.
This commit is contained in:
parent
d800910efd
commit
7e11c5e928
|
@ -1740,6 +1740,15 @@ std::string cmLocalGenerator::GetRealDependency(const char* inName,
|
|||
// This is a full path. Return it as given.
|
||||
return inName;
|
||||
}
|
||||
|
||||
// Check for a source file in this directory that matches the
|
||||
// dependency.
|
||||
if(cmSourceFile* sf = this->Makefile->GetSource(inName))
|
||||
{
|
||||
name = sf->GetFullPath();
|
||||
return name;
|
||||
}
|
||||
|
||||
// Treat the name as relative to the source directory in which it
|
||||
// was given.
|
||||
name = this->Makefile->GetCurrentDirectory();
|
||||
|
|
Loading…
Reference in New Issue