Commit d4a20006 authored by Brad King's avatar Brad King
Browse files

BUG: When a custom command's executable is in the current directory the...

BUG: When a custom command's executable is in the current directory the relative path to it needs a "./".
parent f3a92bdf
......@@ -2661,7 +2661,13 @@ cmLocalUnixMakefileGenerator2
const cmCustomCommandLine& commandLine = *cl;
std::string cmd = commandLine[0];
cmSystemTools::ReplaceString(cmd, "/./", "/");
cmd = this->ConvertToRelativeOutputPath(cmd.c_str());
cmd = this->ConvertToRelativePath(cmd.c_str());
if(cmd.find("/") == cmd.npos)
{
// Add a leading "./" for executables in the current directory.
cmd = "./" + cmd;
}
cmd = cmSystemTools::ConvertToOutputPath(cmd.c_str());
for(unsigned int j=1; j < commandLine.size(); ++j)
{
cmd += " ";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment