diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-04-06 18:29:33 -0400 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-04-06 18:40:12 -0400 |
commit | b64910ce27a4df33e3ad2e3f40764e8b3271a9aa (patch) | |
tree | f1b22f69de853613d9bd37de0bb8a5e417d565d5 /plugin | |
parent | 428a922cd0284b5fbdf97f74118209a6a9b4fb4c (diff) | |
download | mariadb-git-b64910ce27a4df33e3ad2e3f40764e8b3271a9aa.tar.gz |
MDEV-12452 MDEV-12453 : Fix building rocksdb and aws_key_management on macOS
use CMAKE_CXX_STANDARD to set C++11 flags with CMake 3.1+ (apples flags are somehow different from standard clang)
port htonbe16/32/64 macros for rocksdb
use reinterpret_cast<size_t> to cast macOS's pthread_t (pointer type) to size_t , for rocksdb
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/aws_key_management/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugin/aws_key_management/CMakeLists.txt b/plugin/aws_key_management/CMakeLists.txt index 66b8074406f..59fdd1684f2 100644 --- a/plugin/aws_key_management/CMakeLists.txt +++ b/plugin/aws_key_management/CMakeLists.txt @@ -50,7 +50,6 @@ ENDIF() FIND_LIBRARY(AWS_CPP_SDK_CORE NAMES aws-cpp-sdk-core PATH_SUFFIXES "${SDK_INSTALL_BINARY_PREFIX}") FIND_LIBRARY(AWS_CPP_SDK_KMS NAMES aws-cpp-sdk-kms PATH_SUFFIXES "${SDK_INSTALL_BINARY_PREFIX}") -SET(CMAKE_REQUIRED_FLAGS ${CXX11_FLAGS}) FIND_PATH(AWS_CPP_SDK_INCLUDE_DIR NAMES aws/kms/KMSClient.h) IF(AWS_CPP_SDK_CORE AND AWS_CPP_SDK_KMS AND AWS_CPP_SDK_INCLUDE_DIR) @@ -121,6 +120,7 @@ ELSE() -DBUILD_ONLY=kms -DBUILD_SHARED_LIBS=OFF -DFORCE_SHARED_CRT=OFF + -DENABLE_TESTING=OFF "-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} ${PIC_FLAG}" "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${PIC_FLAG}" "-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} ${PIC_FLAG}" @@ -140,7 +140,11 @@ ELSE() ENDIF() ADD_DEFINITIONS(${SSL_DEFINES}) # Need to know whether openssl should be initialized -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}") +IF(CMAKE_VERSION GREATER "3.0") + SET(CMAKE_CXX_STANDARD 11) +ELSE() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}") +ENDIF() IF(WIN32) SET(AWS_CPP_SDK_DEPENDENCIES bcrypt winhttp wininet userenv version) ELSE() |