Ninja: OBJECT_DEPENDS should set an implicit dependency
BUG 13559
This commit is contained in:
parent
f00f58fe13
commit
8f0e08d503
|
@ -514,8 +514,6 @@ void
|
||||||
cmNinjaTargetGenerator
|
cmNinjaTargetGenerator
|
||||||
::WriteObjectBuildStatement(cmSourceFile* source)
|
::WriteObjectBuildStatement(cmSourceFile* source)
|
||||||
{
|
{
|
||||||
cmNinjaDeps emptyDeps;
|
|
||||||
|
|
||||||
std::string comment;
|
std::string comment;
|
||||||
const std::string language = source->GetLanguage();
|
const std::string language = source->GetLanguage();
|
||||||
std::string rule = this->LanguageCompilerRule(language);
|
std::string rule = this->LanguageCompilerRule(language);
|
||||||
|
@ -539,11 +537,12 @@ cmNinjaTargetGenerator
|
||||||
cmNinjaDeps orderOnlyDeps;
|
cmNinjaDeps orderOnlyDeps;
|
||||||
this->GetLocalGenerator()->AppendTargetDepends(this->Target, orderOnlyDeps);
|
this->GetLocalGenerator()->AppendTargetDepends(this->Target, orderOnlyDeps);
|
||||||
|
|
||||||
|
cmNinjaDeps implicitDeps;
|
||||||
if(const char* objectDeps = source->GetProperty("OBJECT_DEPENDS")) {
|
if(const char* objectDeps = source->GetProperty("OBJECT_DEPENDS")) {
|
||||||
std::vector<std::string> depList;
|
std::vector<std::string> depList;
|
||||||
cmSystemTools::ExpandListArgument(objectDeps, depList);
|
cmSystemTools::ExpandListArgument(objectDeps, depList);
|
||||||
std::transform(depList.begin(), depList.end(),
|
std::transform(depList.begin(), depList.end(),
|
||||||
std::back_inserter(orderOnlyDeps), MapToNinjaPath());
|
std::back_inserter(implicitDeps), MapToNinjaPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add order-only dependencies on custom command outputs.
|
// Add order-only dependencies on custom command outputs.
|
||||||
|
@ -625,7 +624,7 @@ cmNinjaTargetGenerator
|
||||||
rule,
|
rule,
|
||||||
outputs,
|
outputs,
|
||||||
explicitDeps,
|
explicitDeps,
|
||||||
emptyDeps,
|
implicitDeps,
|
||||||
orderOnlyDeps,
|
orderOnlyDeps,
|
||||||
vars);
|
vars);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue