summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx7
-rw-r--r--Source/cmGlobalNinjaGenerator.h1
-rw-r--r--Source/cmNinjaTargetGenerator.cxx8
3 files changed, 4 insertions, 12 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index e1e165c..39f5d8f 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -146,13 +146,6 @@ std::string cmGlobalNinjaGenerator::EncodePath(const std::string& path)
return EncodeLiteral(result);
}
-std::string cmGlobalNinjaGenerator::EncodeDepfileSpace(const std::string& path)
-{
- std::string result = path;
- cmSystemTools::ReplaceString(result, " ", "\\ ");
- return result;
-}
-
void cmGlobalNinjaGenerator::WriteBuild(
std::ostream& os, const std::string& comment, const std::string& rule,
const cmNinjaDeps& outputs, const cmNinjaDeps& implicitOuts,
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index b1d6155..41c5175 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -75,7 +75,6 @@ public:
static std::string EncodeIdent(const std::string& ident, std::ostream& vars);
static std::string EncodeLiteral(const std::string& lit);
std::string EncodePath(const std::string& path);
- static std::string EncodeDepfileSpace(const std::string& path);
cmLinkLineComputer* CreateLinkLineComputer(
cmOutputConverter* outputConverter,
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 7e29681..2f4cccb 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -822,8 +822,8 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
vars["DEFINES"] = this->ComputeDefines(source, language);
vars["INCLUDES"] = this->GetIncludes(language);
if (!this->NeedDepTypeMSVC(language)) {
- vars["DEP_FILE"] =
- cmGlobalNinjaGenerator::EncodeDepfileSpace(objectFileName + ".d");
+ vars["DEP_FILE"] = this->GetLocalGenerator()->ConvertToOutputFormat(
+ objectFileName + ".d", cmOutputConverter::SHELL);
}
this->ExportObjectCompileCommand(
@@ -920,8 +920,8 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
vars["INCLUDES"] = sourceDirectoryFlag + " " + vars["INCLUDES"];
// Explicit preprocessing always uses a depfile.
- ppVars["DEP_FILE"] =
- cmGlobalNinjaGenerator::EncodeDepfileSpace(ppFileName + ".d");
+ ppVars["DEP_FILE"] = this->GetLocalGenerator()->ConvertToOutputFormat(
+ ppFileName + ".d", cmOutputConverter::SHELL);
// The actual compilation does not need a depfile because it
// depends on the already-preprocessed source.
vars.erase("DEP_FILE");