summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2015-02-27 15:32:03 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2015-02-27 15:32:03 (GMT)
commit6a661f06030b85b4484733375bbb0aa23eca7446 (patch)
treec10e7f0671c5ad14f932b67c7b7c0165f843a095 /Source/CTest
parent4bef659da525441464ed110d362b46a6eac50a82 (diff)
downloadCMake-6a661f06030b85b4484733375bbb0aa23eca7446.zip
CMake-6a661f06030b85b4484733375bbb0aa23eca7446.tar.gz
CMake-6a661f06030b85b4484733375bbb0aa23eca7446.tar.bz2
CTest: To enforce the C locale use LC_ALL instead of LC_MESSAGES.
If LC_ALL is set it takes precedence over LC_MESSAGES.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index b18786a..b9da8a0 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -72,37 +72,37 @@ public:
cmCTestUpdateHandlerLocale();
~cmCTestUpdateHandlerLocale();
private:
- std::string saveLCMessages;
+ std::string saveLCAll;
};
cmCTestUpdateHandlerLocale::cmCTestUpdateHandlerLocale()
{
- const char* lcmess = cmSystemTools::GetEnv("LC_MESSAGES");
- if(lcmess)
+ const char* lcall = cmSystemTools::GetEnv("LC_ALL");
+ if(lcall)
{
- saveLCMessages = lcmess;
+ saveLCAll = lcall;
}
- // if LC_MESSAGES is not set to C, then
+ // if LC_ALL is not set to C, then
// set it, so that svn/cvs info will be in english ascii
- if(! (lcmess && strcmp(lcmess, "C") == 0))
+ if(! (lcall && strcmp(lcall, "C") == 0))
{
- cmSystemTools::PutEnv("LC_MESSAGES=C");
+ cmSystemTools::PutEnv("LC_ALL=C");
}
}
cmCTestUpdateHandlerLocale::~cmCTestUpdateHandlerLocale()
{
- // restore the value of LC_MESSAGES after running the version control
+ // restore the value of LC_ALL after running the version control
// commands
- if(!saveLCMessages.empty())
+ if(!saveLCAll.empty())
{
- std::string put = "LC_MESSAGES=";
- put += saveLCMessages;
+ std::string put = "LC_ALL=";
+ put += saveLCAll;
cmSystemTools::PutEnv(put);
}
else
{
- cmSystemTools::UnsetEnv("LC_MESSAGES");
+ cmSystemTools::UnsetEnv("LC_ALL");
}
}