summaryrefslogtreecommitdiff
path: root/configure.cmake
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-09-01 21:58:10 +0200
committerSergei Golubchik <serg@mariadb.org>2015-09-04 10:32:02 +0200
commite74f91dfd7986a63e73e72b8a1fbeaa2822d8f1e (patch)
treea23f27c30e40dd58c1a7c6eb2c1ce89ab6826a8b /configure.cmake
parentefbd4bb039060e9cc7a82467c36307367f4013ec (diff)
downloadmariadb-git-e74f91dfd7986a63e73e72b8a1fbeaa2822d8f1e.tar.gz
cmake: always use the same function to test for compiler flags
Fix all cmake tests (including plugin) to use MY_CHECK_AND_SET_COMPILER_FLAG. And fix that function to be compatible with cmake 3.0. This way flag checks are correctly cached (even in cmake 3.0) and properly reused.
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.cmake b/configure.cmake
index e3b40155f88..f4041ef3d94 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -274,8 +274,8 @@ ENDIF()
FIND_PACKAGE (Threads)
FUNCTION(MY_CHECK_PTHREAD_ONCE_INIT)
- CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR_FLAG)
- IF(NOT HAVE_WERROR_FLAG)
+ MY_CHECK_C_COMPILER_FLAG("-Werror")
+ IF(NOT HAVE_C__Werror)
RETURN()
ENDIF()
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")