diff options
Diffstat (limited to 'Source/cmDependsCompiler.cxx')
-rw-r--r-- | Source/cmDependsCompiler.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmDependsCompiler.cxx b/Source/cmDependsCompiler.cxx index 2b48df9..800725f 100644 --- a/Source/cmDependsCompiler.cxx +++ b/Source/cmDependsCompiler.cxx @@ -190,21 +190,19 @@ void cmDependsCompiler::WriteDependencies( bool supportLongLineDepend = static_cast<cmGlobalUnixMakefileGenerator3*>( this->LocalGenerator->GetGlobalGenerator()) ->SupportsLongLineDependencies(); - const auto& binDir = this->LocalGenerator->GetBinaryDirectory(); cmDepends::DependencyMap makeDependencies(dependencies); std::unordered_set<cm::string_view> phonyTargets; // external dependencies file for (auto& node : makeDependencies) { auto target = this->LocalGenerator->ConvertToMakefilePath( - this->LocalGenerator->MaybeConvertToRelativePath(binDir, node.first)); + this->LocalGenerator->MaybeRelativeToTopBinDir(node.first)); auto& deps = node.second; - std::transform( - deps.cbegin(), deps.cend(), deps.begin(), - [this, &binDir](const std::string& dep) { - return this->LocalGenerator->ConvertToMakefilePath( - this->LocalGenerator->MaybeConvertToRelativePath(binDir, dep)); - }); + std::transform(deps.cbegin(), deps.cend(), deps.begin(), + [this](const std::string& dep) { + return this->LocalGenerator->ConvertToMakefilePath( + this->LocalGenerator->MaybeRelativeToTopBinDir(dep)); + }); bool first_dep = true; if (supportLongLineDepend) { |