diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2014-10-13 09:52:28 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2014-10-13 09:52:28 +0200 |
commit | 57eec7bc29734d55600260f93d191664b15ef7cf (patch) | |
tree | 5e4595b95c1636b3a7f3d889de96da08676d4b19 /libmysqld | |
parent | 0827d756276dfaaeac6873daae852c8263146294 (diff) | |
download | mariadb-git-57eec7bc29734d55600260f93d191664b15ef7cf.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.txt | 8 | ||||
-rw-r--r-- | libmysqld/examples/CMakeLists.txt | 6 |
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) |