summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-04-30 19:58:56 (GMT)
committerBrad King <brad.king@kitware.com>2008-04-30 19:58:56 (GMT)
commit9631c499dc31ea1aba70201afc1a565b84c33620 (patch)
tree329eb526cb3d72b847c5d49942885d492ce4c47a /Source/cmLocalUnixMakefileGenerator3.cxx
parent16ec04c2a7ed80fc10cbc731ef3f7646b5fe6b1a (diff)
downloadCMake-9631c499dc31ea1aba70201afc1a565b84c33620.zip
CMake-9631c499dc31ea1aba70201afc1a565b84c33620.tar.gz
CMake-9631c499dc31ea1aba70201afc1a565b84c33620.tar.bz2
BUG: For Watcom WMake use the short path to avoid quoting problems in custom commands with shell redirections.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 14201a4..c4f7d0e 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1019,6 +1019,19 @@ cmLocalUnixMakefileGenerator3
// without the current directory being in the search path.
cmd = "./" + cmd;
}
+ if(this->WatcomWMake &&
+ cmSystemTools::FileIsFullPath(cmd.c_str()) &&
+ cmd.find(" ") != cmd.npos)
+ {
+ // On Watcom WMake use the windows short path for the command
+ // name. This is needed to avoid funny quoting problems on
+ // lines with shell redirection operators.
+ std::string scmd;
+ if(cmSystemTools::GetShortPath(cmd.c_str(), scmd))
+ {
+ cmd = scmd;
+ }
+ }
cmd = this->Convert(cmd.c_str(),NONE,SHELL);
for(unsigned int j=1; j < commandLine.size(); ++j)
{