BUG: Enabled use of EscapeForShell to properly escape custom command lines. This addresses bug#3786 for Xcode.
This commit is contained in:
parent
6d72bb5ae1
commit
b9fc06735d
@ -1037,7 +1037,8 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
|
|||||||
for(unsigned int j=1; j < commandLine.size(); ++j)
|
for(unsigned int j=1; j < commandLine.size(); ++j)
|
||||||
{
|
{
|
||||||
cmd += " ";
|
cmd += " ";
|
||||||
cmd += cmSystemTools::EscapeSpaces(commandLine[j].c_str());
|
cmd += (this->CurrentLocalGenerator
|
||||||
|
->EscapeForShell(commandLine[j].c_str()));
|
||||||
}
|
}
|
||||||
makefileStream << "\t" << cmd.c_str() << "\n";
|
makefileStream << "\t" << cmd.c_str() << "\n";
|
||||||
}
|
}
|
||||||
|
@ -201,12 +201,12 @@ public:
|
|||||||
const char* LanguageCompileFlags;
|
const char* LanguageCompileFlags;
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
/** Escape the given string to be used as a command line argument in
|
/** Escape the given string to be used as a command line argument in
|
||||||
the native build system shell. */
|
the native build system shell. */
|
||||||
std::string EscapeForShell(const char* str);
|
std::string EscapeForShell(const char* str);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
/** Construct a comment for a custom command. */
|
/** Construct a comment for a custom command. */
|
||||||
std::string ConstructComment(const cmCustomCommand& cc,
|
std::string ConstructComment(const cmCustomCommand& cc,
|
||||||
const char* default_comment = "");
|
const char* default_comment = "");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user