diff options
author | David Cole <david.cole@kitware.com> | 2010-09-10 20:17:39 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2010-09-10 21:55:45 (GMT) |
commit | 269a4b876a34483c5cb664499dc6b1634fa453ff (patch) | |
tree | f1af359bc63dc0a36e8e253aad441cb5d4736433 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | de346204b823f79685fa6a0be5c3c376fdbb422b (diff) | |
download | CMake-269a4b876a34483c5cb664499dc6b1634fa453ff.zip CMake-269a4b876a34483c5cb664499dc6b1634fa453ff.tar.gz CMake-269a4b876a34483c5cb664499dc6b1634fa453ff.tar.bz2 |
Enable calling commands with : in argv[1] (#9963)
The solution seems hackish, but it works: for
NMake only, prepend a no-op command before each
real command that begins with ".
This is really a work-around for an NMake problem.
When a command begins with ", nmake truncates the
first argument to the command after the first :
in that arg. It has a parsing problem.
Workaround..., hackish..., but it should solve
the issue for #9963 and its related friends.
Also, modify the CustomCommand test to replicate
the problem reported in issue #9963. Before the
NMake specific code change, the test failed.
Now, it passes. Ahhhhhh.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 004d19a..f04d0a0 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1062,9 +1062,16 @@ cmLocalUnixMakefileGenerator3 } } } - if (useCall && launcher.empty()) + if (launcher.empty()) { - cmd = "call " + cmd; + if (useCall) + { + cmd = "call " + cmd; + } + else if (this->NMake && cmd[0]=='"') + { + cmd = "echo >nul && " + cmd; + } } commands1.push_back(cmd); } |