BUG: Only add leading ./ to custom command executable if the command is really specified as one in the current directory.

This commit is contained in:
Brad King 2005-03-08 11:37:41 -05:00
parent d4a2000657
commit 200c98fc32
1 changed files with 2 additions and 1 deletions

View File

@ -2662,7 +2662,8 @@ cmLocalUnixMakefileGenerator2
std::string cmd = commandLine[0]; std::string cmd = commandLine[0];
cmSystemTools::ReplaceString(cmd, "/./", "/"); cmSystemTools::ReplaceString(cmd, "/./", "/");
cmd = this->ConvertToRelativePath(cmd.c_str()); cmd = this->ConvertToRelativePath(cmd.c_str());
if(cmd.find("/") == cmd.npos) if(cmd.find("/") == cmd.npos &&
commandLine[0].find("/") != cmd.npos)
{ {
// Add a leading "./" for executables in the current directory. // Add a leading "./" for executables in the current directory.
cmd = "./" + cmd; cmd = "./" + cmd;