summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator2.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx
index 55cde22..0289a8e 100644
--- a/Source/cmLocalUnixMakefileGenerator2.cxx
+++ b/Source/cmLocalUnixMakefileGenerator2.cxx
@@ -2662,7 +2662,8 @@ cmLocalUnixMakefileGenerator2
std::string cmd = commandLine[0];
cmSystemTools::ReplaceString(cmd, "/./", "/");
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.
cmd = "./" + cmd;