BUG: Fix dependencies of custom commands that are relative paths to files or other custom command outputs.
This commit is contained in:
parent
65f1e3e1d8
commit
c940351914
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue