summaryrefslogtreecommitdiff
path: root/libmysqld
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 /libmysqld
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 'libmysqld')
-rw-r--r--libmysqld/CMakeLists.txt8
-rw-r--r--libmysqld/examples/CMakeLists.txt6
2 files changed, 14 insertions, 0 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index f31aa819ed5..abbf887e1e6 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -93,6 +93,14 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
)
+# These files have 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(../sql/filesort.cc COMPILE_FLAGS "-Wno-error")
+ ADD_COMPILE_FLAGS(../sql/opt_range.cc COMPILE_FLAGS "-Wno-error")
+ENDIF()
+
ADD_CONVENIENCE_LIBRARY(sql_embedded ${SQL_EMBEDDED_SOURCES})
DTRACE_INSTRUMENT(sql_embedded)
ADD_DEPENDENCIES(sql_embedded GenError GenServerSource)
diff --git a/libmysqld/examples/CMakeLists.txt b/libmysqld/examples/CMakeLists.txt
index c4055a56303..55b2079c320 100644
--- a/libmysqld/examples/CMakeLists.txt
+++ b/libmysqld/examples/CMakeLists.txt
@@ -33,6 +33,12 @@ IF(UNIX)
ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc)
+# 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(../../client/mysqltest.cc COMPILE_FLAGS "-Wno-error")
+ENDIF()
TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver)