BUG: fix for empty custom commands
This commit is contained in:
parent
60bcce7fa2
commit
e86b9d33d0
@ -2527,22 +2527,25 @@ cmLocalUnixMakefileGenerator3
|
|||||||
// Build the command line in a single string.
|
// Build the command line in a single string.
|
||||||
const cmCustomCommandLine& commandLine = *cl;
|
const cmCustomCommandLine& commandLine = *cl;
|
||||||
std::string cmd = commandLine[0];
|
std::string cmd = commandLine[0];
|
||||||
cmSystemTools::ReplaceString(cmd, "/./", "/");
|
if (cmd.size())
|
||||||
cmd = this->Convert(cmd.c_str(),START_OUTPUT);
|
|
||||||
if(cmd.find("/") == cmd.npos &&
|
|
||||||
commandLine[0].find("/") != cmd.npos)
|
|
||||||
{
|
{
|
||||||
// Add a leading "./" for executables in the current directory.
|
cmSystemTools::ReplaceString(cmd, "/./", "/");
|
||||||
cmd = "./" + cmd;
|
cmd = this->Convert(cmd.c_str(),START_OUTPUT);
|
||||||
}
|
if(cmd.find("/") == cmd.npos &&
|
||||||
cmd = this->Convert(cmd.c_str(),NONE,SHELL);
|
commandLine[0].find("/") != cmd.npos)
|
||||||
for(unsigned int j=1; j < commandLine.size(); ++j)
|
{
|
||||||
{
|
// Add a leading "./" for executables in the current directory.
|
||||||
cmd += " ";
|
cmd = "./" + cmd;
|
||||||
cmd += cmSystemTools::EscapeSpaces(commandLine[j].c_str());
|
}
|
||||||
}
|
cmd = this->Convert(cmd.c_str(),NONE,SHELL);
|
||||||
|
for(unsigned int j=1; j < commandLine.size(); ++j)
|
||||||
|
{
|
||||||
|
cmd += " ";
|
||||||
|
cmd += cmSystemTools::EscapeSpaces(commandLine[j].c_str());
|
||||||
|
}
|
||||||
|
|
||||||
commands1.push_back(cmd);
|
commands1.push_back(cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// stick this group of commands into a cd of the proper path
|
// stick this group of commands into a cd of the proper path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user