Skip to content

Commit c97c8c2

Browse files
committed
MDEV-17103 MY_CHECK_{C,CXX}_COMPILER_FLAG do not work on with localized gcc
messages Force LANG=C for MY_CHECK_{C,CXX}_COMPILER_FLAG
1 parent b003b0c commit c97c8c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/check_compiler_flag.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ SET(fail_patterns
1313
FAIL_REGEX "warning:.*redefined"
1414
FAIL_REGEX "[Ww]arning: [Oo]ption"
1515
)
16-
16+
#The regex patterns above are not localized, thus LANG=C
17+
SET(ENV{LANG} C)
1718
MACRO (MY_CHECK_C_COMPILER_FLAG flag)
1819
STRING(REGEX REPLACE "[-,= +]" "_" result "HAVE_C_${flag}")
1920
SET(SAVE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")

0 commit comments

Comments
 (0)