summaryrefslogtreecommitdiff
path: root/cmake/check_compiler_flag.cmake
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2019-06-05 19:42:21 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2019-06-05 19:42:55 +0200
commitc97c8c28b5c8b33d9b1b8563f4ce015c1668b7f1 (patch)
tree1753080f33cdd4aae0e0a1170ed0ea4f738dfe71 /cmake/check_compiler_flag.cmake
parentb003b0c934cf6b59358e31144c4f69cf34622fb8 (diff)
downloadmariadb-git-c97c8c28b5c8b33d9b1b8563f4ce015c1668b7f1.tar.gz
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
Diffstat (limited to 'cmake/check_compiler_flag.cmake')
-rw-r--r--cmake/check_compiler_flag.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/check_compiler_flag.cmake b/cmake/check_compiler_flag.cmake
index 673361ab8fe..547325e4fa2 100644
--- a/cmake/check_compiler_flag.cmake
+++ b/cmake/check_compiler_flag.cmake
@@ -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}")