summaryrefslogtreecommitdiff
path: root/cmake/build_configurations
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2015-01-21 12:03:02 +0100
committerSergei Golubchik <sergii@pisem.net>2015-01-21 12:03:02 +0100
commitd9c01e4b4ac6a7e2bdbcaf71819fa3d4f5269840 (patch)
tree4f86f6ce4e298430e313ed70f2225b3f29485f51 /cmake/build_configurations
parentd854a254b84595b3a8f3a4d8083a2b997d59912e (diff)
parent8bc712e481a18976853fa57a7be77aab6159d431 (diff)
downloadmariadb-git-d9c01e4b4ac6a7e2bdbcaf71819fa3d4f5269840.tar.gz
5.5 merge
Diffstat (limited to 'cmake/build_configurations')
-rw-r--r--cmake/build_configurations/mysql_release.cmake19
1 files changed, 10 insertions, 9 deletions
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake
index 7e5ce563b15..02492f2dbc9 100644
--- a/cmake/build_configurations/mysql_release.cmake
+++ b/cmake/build_configurations/mysql_release.cmake
@@ -202,15 +202,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