diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2014-07-15 17:11:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-07-18 14:05:01 (GMT) |
commit | 09b2ac38d15509ae8d5c54adbcef050846b56210 (patch) | |
tree | ad071f3dea39c5e5f404cba6b3dd2f3190c7dbdb /Tests | |
parent | 49bf3e7d8daab2a1e7ba435d011618bd2c516766 (diff) | |
download | CMake-09b2ac38d15509ae8d5c54adbcef050846b56210.zip CMake-09b2ac38d15509ae8d5c54adbcef050846b56210.tar.gz CMake-09b2ac38d15509ae8d5c54adbcef050846b56210.tar.bz2 |
Encoding: Fix a few encoding problems with ctest.
This also fixes some test failures on Windows when the
name of the build directory contains non-ascii characters.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CTestTestMemcheck/memtester.cxx.in | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Tests/CTestTestMemcheck/memtester.cxx.in b/Tests/CTestTestMemcheck/memtester.cxx.in index 55a34e3..43c0ba7 100644 --- a/Tests/CTestTestMemcheck/memtester.cxx.in +++ b/Tests/CTestTestMemcheck/memtester.cxx.in @@ -1,11 +1,19 @@ #include <cmSystemTools.h> +#include <cmsys/Encoding.hxx> #include <string> +#include <locale.h> #define RETVAL @_retval@ int -main(int argc, char **argv) +main(int ac, char **av) { + setlocale(LC_CTYPE, ""); + cmsys::Encoding::CommandLineArguments args = + cmsys::Encoding::CommandLineArguments::Main(ac, av); + int argc = args.argc(); + const char* const* argv = args.argv(); + std::string exename = argv[0]; std::string logarg; bool nextarg = false; |