diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2012-02-18 16:32:47 (GMT) |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2012-02-18 20:33:33 (GMT) |
commit | 99856d537c996544bf495f33e6b058d83af4c6b7 (patch) | |
tree | 8c96408b7e7b75cc0b92b5d2c0cf44d77426f04b /Source/cmGlobalNinjaGenerator.cxx | |
parent | f999a59afe804063cebf4dd89ef99662829bf3e4 (diff) | |
download | CMake-99856d537c996544bf495f33e6b058d83af4c6b7.zip CMake-99856d537c996544bf495f33e6b058d83af4c6b7.tar.gz CMake-99856d537c996544bf495f33e6b058d83af4c6b7.tar.bz2 |
Ninja: Partially revert "win fixes: escape back slash/colon, use cd. as cmd.exe nop"
It introduced encoding rules in the wrong place, and broke the
CustomCommand test case.
This reverts commit 7fb2bb3e8b0dc7bc718aadc4ab9a74cb7fdb656e.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 879a973..7ff33ba 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -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, |