summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index d8f532f..9f3894a 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -111,7 +111,7 @@ private:
cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3(
cmGlobalGenerator* gg, cmMakefile* mf)
- : cmLocalCommonGenerator(gg, mf, WorkDir::CurBin)
+ : cmLocalCommonGenerator(gg, mf)
{
this->MakefileVariableSize = 0;
this->ColorMakefile = false;
@@ -239,6 +239,12 @@ void cmLocalUnixMakefileGenerator3::GetIndividualFileTargets(
}
}
+std::string cmLocalUnixMakefileGenerator3::GetLinkDependencyFile(
+ cmGeneratorTarget* target, std::string const& /*config*/) const
+{
+ return cmStrCat(target->GetSupportDirectory(), "/link.d");
+}
+
void cmLocalUnixMakefileGenerator3::WriteLocalMakefile()
{
// generate the includes
@@ -2008,6 +2014,18 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo(
<< this->MaybeRelativeToTopBinDir(src) << "\"\n";
}
}
+ } else if (compilerLang.first == "LINK"_s) {
+ auto depFormat = this->Makefile->GetDefinition(
+ cmStrCat("CMAKE_", target->GetLinkerLanguage(this->GetConfigName()),
+ "_LINKER_DEPFILE_FORMAT"));
+ for (auto const& compilerPair : compilerPairs) {
+ for (auto const& src : compilerPair.second) {
+ cmakefileStream << R"( "" ")"
+ << this->MaybeRelativeToTopBinDir(compilerPair.first)
+ << "\" \"" << depFormat << "\" \""
+ << this->MaybeRelativeToTopBinDir(src) << "\"\n";
+ }
+ }
} else {
auto depFormat = this->Makefile->GetSafeDefinition(
cmStrCat("CMAKE_", compilerLang.first, "_DEPFILE_FORMAT"));