summaryrefslogtreecommitdiff
path: root/Source/cmDependsC.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-10 12:08:20 -0400
committerBrad King <brad.king@kitware.com>2020-04-15 08:34:48 -0400
commit031bfaa865956c101aff74d35573381ebe71f0a1 (patch)
tree64bdc894e8fca69c1f1439765362fc2dda55c960 /Source/cmDependsC.cxx
parentca343dad0782733e5e39e7f1427d613e1cad5cf9 (diff)
downloadcmake-031bfaa865956c101aff74d35573381ebe71f0a1.tar.gz
Makefiles: Factor out makefile target path escaping and quoting
Code paths that write makefile target paths use a combination of `cmSystemTools::ConvertToOutputPath` and `cmMakeSafe`. Some were missing the latter. Wrap these two steps up into a dedicated `ConvertToMakefilePath` method provided on both the local and global generators.
Diffstat (limited to 'Source/cmDependsC.cxx')
-rw-r--r--Source/cmDependsC.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index 0748c65001..4499a66812 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -212,12 +212,12 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources,
// written by the original local generator for this directory
// convert the dependencies to paths relative to the home output
// directory. We must do the same here.
- std::string obj_m = cmSystemTools::ConvertToOutputPath(obj_i);
+ std::string obj_m = this->LocalGenerator->ConvertToMakefilePath(obj_i);
internalDepends << obj_i << '\n';
for (std::string const& dep : dependencies) {
makeDepends << obj_m << ": "
- << cmSystemTools::ConvertToOutputPath(
+ << this->LocalGenerator->ConvertToMakefilePath(
this->LocalGenerator->MaybeConvertToRelativePath(binDir,
dep))
<< '\n';