diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2015-04-09 20:56:43 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-13 08:59:34 -0400 |
commit | a198839a7b110a47d76d47e342b1c63f908e6878 (patch) | |
tree | 64a03ec951d59b32d9ba4c6243a5bf072505cb20 /Source/cmCLocaleEnvironmentScope.h | |
parent | 48040c19d5f1bcec55a130fcf8f8d83db27291b4 (diff) | |
download | cmake-a198839a7b110a47d76d47e342b1c63f908e6878.tar.gz |
CTest: Fix locale used for VCS updates
6a661f06030b85b4484733375bbb0aa23eca7446 fixed the
locale used for message output but at the same time broke the locale
used for filename encodings.
This commit preserves LC_CTYPE in the presence of LC_ALL.
Diffstat (limited to 'Source/cmCLocaleEnvironmentScope.h')
-rw-r--r-- | Source/cmCLocaleEnvironmentScope.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Source/cmCLocaleEnvironmentScope.h b/Source/cmCLocaleEnvironmentScope.h new file mode 100644 index 0000000000..b011741a3b --- /dev/null +++ b/Source/cmCLocaleEnvironmentScope.h @@ -0,0 +1,32 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2015 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef cmCLocaleEnvironmentScope_h +#define cmCLocaleEnvironmentScope_h + +#include "cmStandardIncludes.h" + +class cmCLocaleEnvironmentScope +{ +public: + cmCLocaleEnvironmentScope(); + ~cmCLocaleEnvironmentScope(); + +private: + std::string GetEnv(std::string const& key); + void SetEnv(std::string const& key, std::string const& value); + + typedef std::map<std::string, std::string> backup_map_t; + backup_map_t EnvironmentBackup; +}; + +#endif |