summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-08-05 17:27:06 (GMT)
committerBrad King <brad.king@kitware.com>2008-08-05 17:27:06 (GMT)
commit7e11c5e92857de06f842e1753f32afd024ab40ca (patch)
tree488a6f46a43a59f668b1203acec21cf6ffe2b933 /Source/cmLocalGenerator.cxx
parentd800910efd5c59e25ba0026a14642e0b99b237f6 (diff)
downloadCMake-7e11c5e92857de06f842e1753f32afd024ab40ca.zip
CMake-7e11c5e92857de06f842e1753f32afd024ab40ca.tar.gz
CMake-7e11c5e92857de06f842e1753f32afd024ab40ca.tar.bz2
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.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
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();