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
This commit is contained in:
Vladislav Vaintroub 2019-06-05 19:42:21 +02:00
parent b003b0c934
commit c97c8c28b5

View file

@ -13,7 +13,8 @@ SET(fail_patterns
FAIL_REGEX "warning:.*redefined"
FAIL_REGEX "[Ww]arning: [Oo]ption"
)
#The regex patterns above are not localized, thus LANG=C
SET(ENV{LANG} C)
MACRO (MY_CHECK_C_COMPILER_FLAG flag)
STRING(REGEX REPLACE "[-,= +]" "_" result "HAVE_C_${flag}")
SET(SAVE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")