summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-03-29 15:34:58 (GMT)
committerBrad King <brad.king@kitware.com>2005-03-29 15:34:58 (GMT)
commitc9403519149ee70092d003320ae4c6a2653fc905 (patch)
tree2c0810abeb43a855caecb66e46e946867c9a915f /Source
parent65f1e3e1d8a69a9af7744034123fab36c356db1e (diff)
downloadCMake-c9403519149ee70092d003320ae4c6a2653fc905.zip
CMake-c9403519149ee70092d003320ae4c6a2653fc905.tar.gz
CMake-c9403519149ee70092d003320ae4c6a2653fc905.tar.bz2
BUG: Fix dependencies of custom commands that are relative paths to files or other custom command outputs.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalUnixMakefileGenerator2.cxx13
-rw-r--r--Source/cmLocalUnixMakefileGenerator2.h3
2 files changed, 12 insertions, 4 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx
index 840b439..8beb597 100644
--- a/Source/cmLocalUnixMakefileGenerator2.cxx
+++ b/Source/cmLocalUnixMakefileGenerator2.cxx
@@ -2480,7 +2480,8 @@ cmLocalUnixMakefileGenerator2
//----------------------------------------------------------------------------
void
cmLocalUnixMakefileGenerator2
-::AppendAnyDepend(std::vector<std::string>& depends, const char* name)
+::AppendAnyDepend(std::vector<std::string>& depends, const char* name,
+ bool assume_unknown_is_file)
{
// There are a few cases for the name of the target:
// - CMake target in this directory: depend on it.
@@ -2589,9 +2590,15 @@ cmLocalUnixMakefileGenerator2
}
else if(cmSystemTools::FileIsFullPath(name))
{
- // This is a path to a file. Just trust that it will be present.
+ // This is a path to a file. Just trust the listfile author that
+ // it will be present or there is a rule to build it.
depends.push_back(cmSystemTools::CollapseFullPath(name));
}
+ else if(assume_unknown_is_file)
+ {
+ // Just assume this is a file or make target that will be present.
+ depends.push_back(name);
+ }
}
//----------------------------------------------------------------------------
@@ -2632,7 +2639,7 @@ cmLocalUnixMakefileGenerator2
d != cc.GetDepends().end(); ++d)
{
// Add this dependency.
- this->AppendAnyDepend(depends, d->c_str());
+ this->AppendAnyDepend(depends, d->c_str(), true);
}
}
diff --git a/Source/cmLocalUnixMakefileGenerator2.h b/Source/cmLocalUnixMakefileGenerator2.h
index 63cdc4c..76bc75a 100644
--- a/Source/cmLocalUnixMakefileGenerator2.h
+++ b/Source/cmLocalUnixMakefileGenerator2.h
@@ -202,7 +202,8 @@ protected:
void AppendTargetDepends(std::vector<std::string>& depends,
const cmTarget& target);
- void AppendAnyDepend(std::vector<std::string>& depends, const char* name);
+ void AppendAnyDepend(std::vector<std::string>& depends, const char* name,
+ bool assume_unknown_is_file=false);
void AppendRuleDepend(std::vector<std::string>& depends,
const char* ruleFileName);
void AppendCustomDepends(std::vector<std::string>& depends,