diff options
author | Brad King <brad.king@kitware.com> | 2008-08-05 17:27:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-08-05 17:27:06 (GMT) |
commit | 7e11c5e92857de06f842e1753f32afd024ab40ca (patch) | |
tree | 488a6f46a43a59f668b1203acec21cf6ffe2b933 /Source/cmLocalGenerator.cxx | |
parent | d800910efd5c59e25ba0026a14642e0b99b237f6 (diff) | |
download | CMake-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.cxx | 9 |
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(); |