summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-06 18:09:37 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-06 18:32:26 (GMT)
commit87be2e1427ba2b1b7697c9332487862917897dca (patch)
tree4880d84b5d265e45033a23258e2645bbfef0f795 /Source/cmakemain.cxx
parent44100adc6c7f7db7bfd4ccf0d8bd18de8ab195c0 (diff)
downloadCMake-87be2e1427ba2b1b7697c9332487862917897dca.zip
CMake-87be2e1427ba2b1b7697c9332487862917897dca.tar.gz
CMake-87be2e1427ba2b1b7697c9332487862917897dca.tar.bz2
Do not call setlocale() globally in CMake applications (#15377)
Revert the changes made by commit v3.1.0-rc1~406^2~1 (Encoding: Add setlocale() to applications, 2014-05-30) and commit v3.1.0-rc1~406^2 (Encoding: Change to only set LC_CTYPE, 2014-06-11), and other setlocale calls added later in their spirit. CMake has not been taught how to deal with non-C locales everywhere. We do not define any functionality for character conversions for non-ASCII strings. Another solution will be needed to address the original problem motivating addition of setlocale() calls.
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx2
1 files changed, 0 insertions, 2 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 61b175e..e825f1f 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -25,7 +25,6 @@
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include <cmsys/Encoding.hxx>
-#include <locale.h>
#ifdef CMAKE_BUILD_WITH_CMAKE
//----------------------------------------------------------------------------
@@ -175,7 +174,6 @@ static void cmakemainProgressCallback(const char *m, float prog,
int main(int ac, char const* const* av)
{
- setlocale(LC_CTYPE, "");
cmsys::Encoding::CommandLineArguments args =
cmsys::Encoding::CommandLineArguments::Main(ac, av);
ac = args.argc();