summaryrefslogtreecommitdiff
path: root/configure.cmake
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-06-27 20:35:26 +0200
committerSergei Golubchik <serg@mariadb.org>2015-06-27 20:35:26 +0200
commit658992699b204da04382142e77af042c8a33a334 (patch)
tree464bc87eae9ffb0fd1a7ba6fa11148b50a295d6b /configure.cmake
parentfe7e334f3e238368e18fc2ccb98b3357ecb1e03e (diff)
parenta6087e7dc1ef3561d8189c8db15e9591d0f9b520 (diff)
downloadmariadb-git-658992699b204da04382142e77af042c8a33a334.tar.gz
Merge tag 'mariadb-10.0.20' into 10.1
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake15
1 files changed, 10 insertions, 5 deletions
diff --git a/configure.cmake b/configure.cmake
index 22a5d59bfb1..e3d7ed49a2e 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -52,7 +52,7 @@ IF(NOT SYSTEM_TYPE)
ENDIF()
ENDIF()
-IF(CMAKE_COMPILER_IS_GNUCXX)
+IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
# MySQL "canonical" GCC flags. At least -fno-rtti flag affects
# ABI and cannot be simply removed.
SET(CMAKE_CXX_FLAGS
@@ -175,7 +175,6 @@ CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H)
CHECK_INCLUDE_FILES (aio.h HAVE_AIO_H)
CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H)
CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H)
-CHECK_INCLUDE_FILE_CXX (cxxabi.h HAVE_CXXABI_H)
CHECK_INCLUDE_FILES (dirent.h HAVE_DIRENT_H)
CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H)
CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H)
@@ -880,7 +879,7 @@ ENDIF(NOT HAVE_POSIX_SIGNALS)
# Assume regular sprintf
SET(SPRINTFS_RETURNS_INT 1)
-IF(CMAKE_COMPILER_IS_GNUCXX AND HAVE_CXXABI_H)
+IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
CHECK_CXX_SOURCE_COMPILES("
#include <cxxabi.h>
int main(int argc, char **argv)
@@ -952,7 +951,6 @@ SET(SIGNAL_WITH_VIO_CLOSE 1)
MARK_AS_ADVANCED(NO_ALARM)
-IF(CMAKE_COMPILER_IS_GNUCXX)
IF(WITH_ATOMIC_OPS STREQUAL "up")
SET(MY_ATOMIC_MODE_DUMMY 1 CACHE BOOL "Assume single-CPU mode, no concurrency")
ELSEIF(WITH_ATOMIC_OPS STREQUAL "smp")
@@ -981,10 +979,17 @@ ELSEIF(NOT WITH_ATOMIC_OPS)
return 0;
}"
HAVE_GCC_ATOMIC_BUILTINS)
+ CHECK_CXX_SOURCE_COMPILES("
+ int main()
+ {
+ long long int var= 1;
+ long long int *ptr= &var;
+ return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
+ }"
+ HAVE_GCC_C11_ATOMICS)
ELSE()
MESSAGE(FATAL_ERROR "${WITH_ATOMIC_OPS} is not a valid value for WITH_ATOMIC_OPS!")
ENDIF()
-ENDIF()
SET(WITH_ATOMIC_OPS "${WITH_ATOMIC_OPS}" CACHE STRING "Implement atomic operations using atomic CPU instructions for multi-processor (smp) or uniprocessor (up) configuration. By default gcc built-in sync functions are used, if available and 'smp' configuration otherwise.")
MARK_AS_ADVANCED(WITH_ATOMIC_OPS MY_ATOMIC_MODE_DUMMY)