summaryrefslogtreecommitdiffstats
path: root/Source/cmGccDepfileReader.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/cmGccDepfileReader.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/cmGccDepfileReader.cxx')
-rw-r--r--Source/cmGccDepfileReader.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGccDepfileReader.cxx b/Source/cmGccDepfileReader.cxx
index 8253375..6436baa 100644
--- a/Source/cmGccDepfileReader.cxx
+++ b/Source/cmGccDepfileReader.cxx
@@ -24,7 +24,7 @@ cm::optional<cmGccDepfileContent> cmReadGccDepfile(const char* filePath,
for (auto& dep : *deps) {
for (auto& rule : dep.rules) {
if (!prefix.empty() && !cmSystemTools::FileIsFullPath(rule)) {
- rule = cmStrCat(prefix, rule);
+ rule = cmStrCat(prefix, '/', rule);
}
if (cmSystemTools::FileIsFullPath(rule)) {
rule = cmSystemTools::CollapseFullPath(rule);
@@ -33,7 +33,7 @@ cm::optional<cmGccDepfileContent> cmReadGccDepfile(const char* filePath,
}
for (auto& path : dep.paths) {
if (!prefix.empty() && !cmSystemTools::FileIsFullPath(path)) {
- path = cmStrCat(prefix, path);
+ path = cmStrCat(prefix, '/', path);
}
if (cmSystemTools::FileIsFullPath(path)) {
path = cmSystemTools::CollapseFullPath(path);