diff options
author | Brad King <brad.king@kitware.com> | 2007-05-16 20:19:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-05-16 20:19:18 (GMT) |
commit | 73197eaefad818a9e67de6c2140dc13251c14d7a (patch) | |
tree | b706e0e14c1777dadd05be39e9232a6570432977 /Source | |
parent | e1260b846813785a4c807e0e9aad1776905bfea7 (diff) | |
download | CMake-73197eaefad818a9e67de6c2140dc13251c14d7a.zip CMake-73197eaefad818a9e67de6c2140dc13251c14d7a.tar.gz CMake-73197eaefad818a9e67de6c2140dc13251c14d7a.tar.bz2 |
BUG: Shell escaping needs to write % as %% for VS IDE.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/kwsys/System.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/kwsys/System.c b/Source/kwsys/System.c index 62807c8..41d6667 100644 --- a/Source/kwsys/System.c +++ b/Source/kwsys/System.c @@ -287,6 +287,15 @@ static int kwsysSystem_Shell__GetArgumentSize(const char* in, ++size; } } + else if(*c == '%') + { + if(flags & kwsysSystem_Shell_Flag_VSIDE) + { + /* In a VS IDE a percent is written %% so we need one extra + characters. */ + size += 1; + } + } } /* Check whether the argument needs surrounding quotes. */ @@ -432,6 +441,20 @@ static char* kwsysSystem_Shell__GetArgument(const char* in, char* out, *out++ = '#'; } } + else if(*c == '%') + { + if(flags & kwsysSystem_Shell_Flag_VSIDE) + { + /* In a VS IDE a percent is written %%. */ + *out++ = '%'; + *out++ = '%'; + } + else + { + /* Otherwise a percent is written just %. */ + *out++ = '%'; + } + } else { /* Store this character. */ |