diff options
author | Brad King <brad.king@kitware.com> | 2008-12-18 18:36:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-12-18 18:36:58 (GMT) |
commit | 0a83aa6f5700b424830136ebd2bf285e8ce6b56d (patch) | |
tree | 2b72bf2efbf0412092d64c9e061d9158f072a7c1 /Source/kwsys | |
parent | adb6bf82b0c780f9fbf36ef5bebaa38d4e7eb5ae (diff) | |
download | CMake-0a83aa6f5700b424830136ebd2bf285e8ce6b56d.zip CMake-0a83aa6f5700b424830136ebd2bf285e8ce6b56d.tar.gz CMake-0a83aa6f5700b424830136ebd2bf285e8ce6b56d.tar.bz2 |
BUG: Fix windows command line escape for empty arg
On Windows the KWSys System package generates escapes for command-line
arguments. This fix enables quoting of the empty string as an argument.
This also adds a test to pass an empty argument to a custom command.
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/System.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/kwsys/System.c b/Source/kwsys/System.c index d205c96..900b025 100644 --- a/Source/kwsys/System.c +++ b/Source/kwsys/System.c @@ -170,6 +170,12 @@ flag later when we understand applications of this better. static int kwsysSystem_Shell__ArgumentNeedsQuotes(const char* in, int isUnix, int flags) { + /* The empty string needs quotes. */ + if(!*in) + { + return 1; + } + /* Scan the string for characters that require quoting. */ { const char* c; |