MantisBT - CMake
View Issue Details
0014102CMakeCMakepublic2013-04-21 04:062013-10-07 10:09
Marco Nolden 
Brad King 
normalmajoralways
closedfixed 
CMake 2.8.10.2 
 
0014102: CHECK_C_COMPILER_FLAG does not work on non-English locales
The regular expressions that are used in

CHECK_C_COMPILER_FLAG

only work for an English or C locale. On a German localized system e.g. the gcc warning is not recognized if you pass a C++ option like "-fvisibility-inlines-hidden" to gcc.

I think there are two options:

1. add some code to switch the locale before the test, like it is done in CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake

2. try if -Werror or an equivalent is accepted first and then pass it together with the option that should actually be tested
No tags attached.
patch 52723722+0001-Check-C-CXX-CompilerFlag-Test-using-C-locale-14102.patch (3,438) 2013-04-22 08:55
https://public.kitware.com/Bug/file/4748/52723722%2B0001-Check-C-CXX-CompilerFlag-Test-using-C-locale-14102.patch
Issue History
2013-04-21 04:06Marco NoldenNew Issue
2013-04-22 08:55Brad KingFile Added: 52723722+0001-Check-C-CXX-CompilerFlag-Test-using-C-locale-14102.patch
2013-04-22 08:55Brad KingNote Added: 0032916
2013-04-22 08:55Brad KingAssigned To => Brad King
2013-04-22 08:55Brad KingStatusnew => assigned
2013-04-26 02:49saschaNote Added: 0032945
2013-04-30 09:08Brad KingNote Added: 0032964
2013-04-30 09:08Brad KingStatusassigned => resolved
2013-04-30 09:08Brad KingResolutionopen => fixed
2013-10-07 10:09Robert MaynardNote Added: 0034040
2013-10-07 10:09Robert MaynardStatusresolved => closed

Notes
(0032916)
Brad King   
2013-04-22 08:55   
Good catch. Please test

 52723722+0001-Check-C-CXX-CompilerFlag-Test-using-C-locale-14102.patch
(0032945)
sascha   
2013-04-26 02:49   
Hi,

I have tested your patch successfully with gcc 4.7 using a German locale. Thanks!
(0032964)
Brad King   
2013-04-30 09:08   
Thanks for testing. Applied:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52723722 [^]
(0034040)
Robert Maynard   
2013-10-07 10:09   
Closing resolved issues that have not been updated in more than 4 months.