summaryrefslogtreecommitdiff
path: root/client/CMakeLists.txt
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2014-10-13 09:52:28 +0200
committerJon Olav Hauglid <jon.hauglid@oracle.com>2014-10-13 09:52:28 +0200
commit8b64f825058a2439903e9420552641ca6105d9d6 (patch)
tree5e4595b95c1636b3a7f3d889de96da08676d4b19 /client/CMakeLists.txt
parenta3cc647dbdbdeb0f2e9c9ac55ffe062c659d82dc (diff)
downloadmariadb-git-8b64f825058a2439903e9420552641ca6105d9d6.tar.gz
Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG
Bug#17959689: MAKE GCC AND CLANG GIVE CONSISTENT COMPILATION WARNINGS Bug#18313717: ENABLE -WERROR IN MAINTANER MODE WHEN COMPILING WITH CLANG Bug#18510941: REMOVE CMAKE WORKAROUNDS FOR OLDER VERSIONS OF OS X/XCODE Backport from mysql-5.6 to mysql-5.5
Diffstat (limited to 'client/CMakeLists.txt')
-rw-r--r--client/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 4d8fab3f4b9..0d67cf2e0d4 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -35,6 +35,12 @@ ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
+# mysqltest has unused result errors, so we skip Werror
+CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR_FLAG)
+IF(HAVE_WERROR_FLAG)
+ INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
+ ADD_COMPILE_FLAGS(mysqltest.cc COMPILE_FLAGS "-Wno-error")
+ENDIF()
TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex)