summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsCompiler.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-01-16 16:37:23 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2021-01-19 12:17:14 (GMT)
commitb5c2163293c08e8e53203d86a069713e06874886 (patch)
treef3d6d249054fee14b6e0122bc021be958c59b3dd /Source/cmDependsCompiler.cxx
parent5b9f7a5f285d648698068abe8eb238cd4dda7161 (diff)
downloadCMake-b5c2163293c08e8e53203d86a069713e06874886.zip
CMake-b5c2163293c08e8e53203d86a069713e06874886.tar.gz
CMake-b5c2163293c08e8e53203d86a069713e06874886.tar.bz2
Ninja: add_custom_command(DEPFILE): Ensure dependencies consistency
Fixes: #21694
Diffstat (limited to 'Source/cmDependsCompiler.cxx')
-rw-r--r--Source/cmDependsCompiler.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/Source/cmDependsCompiler.cxx b/Source/cmDependsCompiler.cxx
index ec31f68..2b48df9 100644
--- a/Source/cmDependsCompiler.cxx
+++ b/Source/cmDependsCompiler.cxx
@@ -97,17 +97,8 @@ bool cmDependsCompiler::CheckDependencies(
std::vector<std::string> depends;
if (format == "custom"_s) {
- std::string prefix;
- if (this->LocalGenerator->GetCurrentBinaryDirectory() !=
- this->LocalGenerator->GetBinaryDirectory()) {
- prefix =
- cmStrCat(this->LocalGenerator->MaybeConvertToRelativePath(
- this->LocalGenerator->GetBinaryDirectory(),
- this->LocalGenerator->GetCurrentBinaryDirectory()),
- '/');
- }
-
- auto deps = cmReadGccDepfile(depFile.c_str(), prefix);
+ auto deps = cmReadGccDepfile(
+ depFile.c_str(), this->LocalGenerator->GetCurrentBinaryDirectory());
if (!deps) {
continue;
}