From 7e11c5e92857de06f842e1753f32afd024ab40ca Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 5 Aug 2008 13:27:06 -0400 Subject: 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. --- Source/cmLocalGenerator.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 79e64d7..35e14ff 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -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(); -- cgit v0.12