|
|
@@ -150,6 +150,8 @@ void cmMakefileTargetGenerator::GetTargetLinkFlags(
|
|
|
|
|
|
this->LocalGenerator->AppendPositionIndependentLinkerFlags(
|
|
|
flags, this->GeneratorTarget, this->GetConfigName(), linkLanguage);
|
|
|
+ this->LocalGenerator->AppendDependencyInfoLinkerFlags(
|
|
|
+ flags, this->GeneratorTarget, this->GetConfigName(), linkLanguage);
|
|
|
}
|
|
|
|
|
|
void cmMakefileTargetGenerator::CreateRuleFile()
|
|
|
@@ -414,8 +416,10 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
|
|
|
this->GlobalGenerator->SupportsCompilerDependencies() &&
|
|
|
(!this->Makefile->IsDefinitionSet(depsUseCompiler) ||
|
|
|
this->Makefile->IsOn(depsUseCompiler));
|
|
|
+ bool linkerGenerateDeps =
|
|
|
+ this->GeneratorTarget->HasLinkDependencyFile(this->GetConfigName());
|
|
|
|
|
|
- if (compilerGenerateDeps || ccGenerateDeps) {
|
|
|
+ if (compilerGenerateDeps || linkerGenerateDeps || ccGenerateDeps) {
|
|
|
std::string compilerDependFile =
|
|
|
cmStrCat(this->TargetBuildDirectoryFull, "/compiler_depend.make");
|
|
|
*this->BuildFileStream << "# Include any dependencies generated by the "
|
|
|
@@ -1499,6 +1503,21 @@ bool cmMakefileTargetGenerator::WriteMakeRule(
|
|
|
return symbolic;
|
|
|
}
|
|
|
|
|
|
+void cmMakefileTargetGenerator::WriteTargetLinkDependRules()
|
|
|
+{
|
|
|
+ if (!this->GeneratorTarget->HasLinkDependencyFile(this->GetConfigName())) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ auto depFile = this->LocalGenerator->GetLinkDependencyFile(
|
|
|
+ this->GeneratorTarget, this->GetConfigName());
|
|
|
+ this->CleanFiles.insert(depFile);
|
|
|
+ this->LocalGenerator->AddImplicitDepends(
|
|
|
+ this->GeneratorTarget, "LINK",
|
|
|
+ this->GeneratorTarget->GetFullPath(this->GetConfigName()), depFile,
|
|
|
+ cmDependencyScannerKind::Compiler);
|
|
|
+}
|
|
|
+
|
|
|
void cmMakefileTargetGenerator::WriteTargetDependRules()
|
|
|
{
|
|
|
// must write the targets depend info file
|
|
|
@@ -2052,8 +2071,14 @@ void cmMakefileTargetGenerator::AppendTargetDepends(
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- // Loop over all library dependencies.
|
|
|
const std::string& cfg = this->GetConfigName();
|
|
|
+
|
|
|
+ if (this->GeneratorTarget->HasLinkDependencyFile(cfg)) {
|
|
|
+ depends.push_back(
|
|
|
+ cmStrCat(this->TargetBuildDirectoryFull, "/compiler_depend.ts"));
|
|
|
+ }
|
|
|
+
|
|
|
+ // Loop over all library dependencies.
|
|
|
if (cmComputeLinkInformation* cli =
|
|
|
this->GeneratorTarget->GetLinkInformation(cfg)) {
|
|
|
cm::append(depends, cli->GetDepends());
|