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 | 8b64f825058a2439903e9420552641ca6105d9d6 (patch) | |
tree | 5e4595b95c1636b3a7f3d889de96da08676d4b19 /cmake/build_configurations | |
parent | a3cc647dbdbdeb0f2e9c9ac55ffe062c659d82dc (diff) | |
download | mariadb-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 'cmake/build_configurations')
-rw-r--r-- | cmake/build_configurations/mysql_release.cmake | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake index e2b815ef830..b0d3de10299 100644 --- a/cmake/build_configurations/mysql_release.cmake +++ b/cmake/build_configurations/mysql_release.cmake @@ -189,15 +189,16 @@ IF(UNIX) ENDIF() ENDIF() - # OSX flags - IF(APPLE) - SET(COMMON_C_FLAGS "-g -fno-common -fno-strict-aliasing") - # XXX: why are we using -felide-constructors on OSX? - SET(COMMON_CXX_FLAGS "-g -fno-common -felide-constructors -fno-strict-aliasing") - SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}") - SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}") - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${COMMON_C_FLAGS}") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${COMMON_CXX_FLAGS}") + # Default Clang flags + IF(CMAKE_C_COMPILER_ID MATCHES "Clang") + SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing") + SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}") + SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}") + ENDIF() + IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing") + SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}") ENDIF() # Solaris flags |