|
|
@@ -59,7 +59,6 @@ static bool IsIdentChar(char c)
|
|
|
(c == '_') || (c == '$') || (c == '\\');
|
|
|
}
|
|
|
|
|
|
-
|
|
|
std::string cmGlobalNinjaGenerator::EncodeIdent(const std::string &ident,
|
|
|
std::ostream &vars) {
|
|
|
if (std::find_if(ident.begin(), ident.end(),
|
|
|
@@ -70,19 +69,14 @@ std::string cmGlobalNinjaGenerator::EncodeIdent(const std::string &ident,
|
|
|
vars << names.str() << " = " << ident << "\n";
|
|
|
return "$" + names.str();
|
|
|
} else {
|
|
|
- return EncodeLiteral(ident);
|
|
|
+ return ident;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
std::string cmGlobalNinjaGenerator::EncodeLiteral(const std::string &lit)
|
|
|
{
|
|
|
std::string result = lit;
|
|
|
cmSystemTools::ReplaceString(result, "$", "$$");
|
|
|
- cmSystemTools::ReplaceString(result, ":", "$:");
|
|
|
-#ifdef _WIN32
|
|
|
- cmSystemTools::ReplaceString(result, "/", "\\");
|
|
|
-#endif
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@@ -206,8 +200,7 @@ cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command,
|
|
|
this->AddCustomCommandRule();
|
|
|
|
|
|
cmNinjaVars vars;
|
|
|
-
|
|
|
- vars["COMMAND"] = EncodeLiteral(command);
|
|
|
+ vars["COMMAND"] = command;
|
|
|
vars["DESC"] = EncodeLiteral(description);
|
|
|
|
|
|
cmGlobalNinjaGenerator::WriteBuild(*this->BuildFileStream,
|