diff options
author | Brad King <brad.king@kitware.com> | 2014-07-21 14:36:00 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-07-21 14:36:00 (GMT) |
commit | b86f0e445b1d7f9e58c8d2d9f14c7501e734057d (patch) | |
tree | edc5df26ac4a261899e62cd62d601e461ec97bfc /Source/kwsys/testProcess.c | |
parent | 8e018ae44e80425ee77db675fb452b9e0eb9730c (diff) | |
parent | 6f3e094e9f0017b63e138e001c86e467c8f9b7c9 (diff) | |
download | CMake-b86f0e445b1d7f9e58c8d2d9f14c7501e734057d.zip CMake-b86f0e445b1d7f9e58c8d2d9f14c7501e734057d.tar.gz CMake-b86f0e445b1d7f9e58c8d2d9f14c7501e734057d.tar.bz2 |
Merge topic 'update-kwsys'
6f3e094e Merge branch 'upstream-kwsys' into update-kwsys
d4d1b7f7 KWSys 2014-07-18 (65b36ede)
Diffstat (limited to 'Source/kwsys/testProcess.c')
-rw-r--r-- | Source/kwsys/testProcess.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/kwsys/testProcess.c b/Source/kwsys/testProcess.c index 6d5eb71..3d62822 100644 --- a/Source/kwsys/testProcess.c +++ b/Source/kwsys/testProcess.c @@ -11,11 +11,13 @@ ============================================================================*/ #include "kwsysPrivate.h" #include KWSYS_HEADER(Process.h) +#include KWSYS_HEADER(Encoding.h) /* Work-around CMake dependency scanning limitation. This must duplicate the above list of headers. */ #if 0 # include "Process.h.in" +# include "Encoding.h.in" #endif #include <stdio.h> @@ -393,6 +395,19 @@ int runChild(const char* cmd[], int state, int exception, int value, int main(int argc, const char* argv[]) { int n = 0; + +#ifdef _WIN32 + int i; + char new_args[10][_MAX_PATH]; + LPWSTR* w_av = CommandLineToArgvW(GetCommandLineW(), &argc); + for(i=0; i<argc; i++) + { + kwsysEncoding_wcstombs(new_args[i], w_av[i], _MAX_PATH); + argv[i] = new_args[i]; + } + LocalFree(w_av); +#endif + #if 0 { HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE); |