mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 19:08:07 +08:00
BUG: Cannot add extra escapes for backslashes because it makes the behavior inconsistent with previous versions of cmake.
This commit is contained in:
@@ -72,8 +72,10 @@ void cmAddTestCommand::FinalPass()
|
||||
fout << " \"";
|
||||
for(std::string::iterator c = it->begin(); c != it->end(); ++c)
|
||||
{
|
||||
// Escape quotes and backslashes within arguments.
|
||||
if((*c == '"') || (*c == '\\'))
|
||||
// Escape quotes within arguments. We should escape
|
||||
// backslashes too but we cannot because it makes the result
|
||||
// inconsistent with previous behavior of this command.
|
||||
if((*c == '"'))
|
||||
{
|
||||
fout << '\\';
|
||||
}
|
||||
|
Reference in New Issue
Block a user