diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2017-03-31 01:14:00 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2017-03-31 01:14:00 +0300 |
commit | 5210c69e71ddcf39ca14194504e45baa4d325610 (patch) | |
tree | 846e5597b87730f756d2883af273ff90dc7fdb5d /cmake | |
parent | c29336f2b0c99d39979609374b8673573475696f (diff) | |
parent | a0c79bcf0062adc2489f0b0bed98b05d4db8f476 (diff) | |
download | mariadb-git-5210c69e71ddcf39ca14194504e45baa4d325610.tar.gz |
Merge 10.2 into bb-10.2-mariarocks
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/build_configurations/mysql_release.cmake | 8 | ||||
-rw-r--r-- | cmake/bzip2.cmake | 33 | ||||
-rw-r--r-- | cmake/for_clients.cmake | 2 | ||||
-rw-r--r-- | cmake/lz4.cmake | 56 | ||||
-rw-r--r-- | cmake/lzma.cmake | 33 | ||||
-rw-r--r-- | cmake/lzo.cmake | 48 | ||||
-rw-r--r-- | cmake/mysql_add_executable.cmake | 8 | ||||
-rw-r--r-- | cmake/plugin.cmake | 7 | ||||
-rw-r--r-- | cmake/snappy.cmake | 32 | ||||
-rw-r--r-- | cmake/systemd.cmake | 2 | ||||
-rw-r--r-- | cmake/win_compatibility.manifest | 22 |
11 files changed, 44 insertions, 207 deletions
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake index 363cbac584d..726a151a5b1 100644 --- a/cmake/build_configurations/mysql_release.cmake +++ b/cmake/build_configurations/mysql_release.cmake @@ -27,7 +27,10 @@ ENDIF() IF(SIZEOF_VOIDP EQUAL 8) SET(64BIT 1) ENDIF() - + +# include aws_key_management plugin in release builds +OPTION(AWS_SDK_EXTERNAL_PROJECT "Allow download and build AWS C++ SDK" ON) + SET(FEATURE_SET "community" CACHE STRING " Selection of features. Options are - xsmall : @@ -83,10 +86,13 @@ IF(FEATURE_SET) ENDIF() OPTION(ENABLED_LOCAL_INFILE "" ON) +SET(WITH_INNODB_SNAPPY OFF CACHE STRING "") IF(WIN32) ELSEIF(RPM) SET(WITH_SSL system CACHE STRING "") SET(WITH_ZLIB system CACHE STRING "") + SET(CHECKMODULE /usr/bin/checkmodule CACHE STRING "") + SET(SEMODULE_PACKAGE /usr/bin/semodule_package CACHE STRING "") ELSEIF(DEB) SET(WITH_SSL system CACHE STRING "") SET(WITH_ZLIB system CACHE STRING "") diff --git a/cmake/bzip2.cmake b/cmake/bzip2.cmake deleted file mode 100644 index 0c15853d0b9..00000000000 --- a/cmake/bzip2.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2014, SkySQL Ab. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -SET(WITH_INNODB_BZIP2 AUTO CACHE STRING - "Build with bzip2. Possible values are 'ON', 'OFF', 'AUTO' and default is 'AUTO'") - -MACRO (MYSQL_CHECK_BZIP2) - IF (WITH_INNODB_BZIP2 STREQUAL "ON" OR WITH_INNODB_BZIP2 STREQUAL "AUTO") - CHECK_INCLUDE_FILES(bzlib.h HAVE_BZLIB2_H) - CHECK_LIBRARY_EXISTS(bz2 BZ2_bzBuffToBuffCompress "" HAVE_BZLIB2_COMPRESS) - CHECK_LIBRARY_EXISTS(bz2 BZ2_bzBuffToBuffDecompress "" HAVE_BZLIB2_DECOMPRESS) - - IF (HAVE_BZLIB2_COMPRESS AND HAVE_BZLIB2_DECOMPRESS AND HAVE_BZLIB2_H) - ADD_DEFINITIONS(-DHAVE_BZIP2=1) - LINK_LIBRARIES(bz2) - ELSE() - IF (WITH_INNODB_BZIP2 STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required bzip2 library is not found") - ENDIF() - ENDIF() - ENDIF() -ENDMACRO() diff --git a/cmake/for_clients.cmake b/cmake/for_clients.cmake index f6a076f9632..636610e7fba 100644 --- a/cmake/for_clients.cmake +++ b/cmake/for_clients.cmake @@ -66,7 +66,7 @@ ENDMACRO() # FIXME until we have a --cxxflags, we need to remove -AC99 # to make --cflags usable for HP C++ (aCC) REPLACE_FOR_CLIENTS(CFLAGS "[DU]DBUG_OFF" "[DU]SAFE_MUTEX" "[DU]NDEBUG" - "[DU]UNIV_MUST_NOT_INLINE" "[DU]FORCE_INIT_OF_VARS" "[DU]EXTRA_DEBUG" "[DU]HAVE_valgrind" + "[DU]FORCE_INIT_OF_VARS" "[DU]EXTRA_DEBUG" "[DU]HAVE_valgrind" "O" "O[0-9]" "xO[0-9]" "W[-A-Za-z]*" "mtune=[-A-Za-z0-9]*" "g" "fPIC" "mcpu=[-A-Za-z0-9]*" "unroll2" "ip" "mp" "march=[-A-Za-z0-9]*" "Xa" "xstrconst" "xc99=none" "AC99" "restrict" "W[-A-Za-z]*=[-A-Za-z0-9]*") diff --git a/cmake/lz4.cmake b/cmake/lz4.cmake deleted file mode 100644 index 075904589f0..00000000000 --- a/cmake/lz4.cmake +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2014, SkySQL Ab. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -SET(WITH_INNODB_LZ4 AUTO CACHE STRING - "Build with lz4. Possible values are 'ON', 'OFF', 'AUTO' and default is 'AUTO'") - -MACRO (MYSQL_CHECK_LZ4) - IF (WITH_INNODB_LZ4 STREQUAL "ON" OR WITH_INNODB_LZ4 STREQUAL "AUTO") - CHECK_INCLUDE_FILES(lz4.h HAVE_LZ4_H) - CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_limitedOutput "" HAVE_LZ4_SHARED_LIB) - CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT) - - IF (HAVE_LZ4_SHARED_LIB AND HAVE_LZ4_H) - ADD_DEFINITIONS(-DHAVE_LZ4=1) - IF (HAVE_LZ4_COMPRESS_DEFAULT) - ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1) - ENDIF() - LINK_LIBRARIES(lz4) - ELSE() - IF (WITH_INNODB_LZ4 STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required lz4 library is not found") - ENDIF() - ENDIF() - ENDIF() -ENDMACRO() - -MACRO (MYSQL_CHECK_LZ4_STATIC) - IF (WITH_INNODB_LZ4 STREQUAL "ON" OR WITH_INNODB_LZ4 STREQUAL "AUTO") - CHECK_INCLUDE_FILES(lz4.h HAVE_LZ4_H) - CHECK_LIBRARY_EXISTS(liblz4.a LZ4_compress_limitedOutput "" HAVE_LZ4_LIB) - CHECK_LIBRARY_EXISTS(liblz3.a LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT) - - IF(HAVE_LZ4_LIB AND HAVE_LZ4_H) - ADD_DEFINITIONS(-DHAVE_LZ4=1) - IF (HAVE_LZ4_COMPRESS_DEFAULT) - ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1) - ENDIF() - LINK_LIBRARIES(liblz4.a) - ELSE() - IF (WITH_INNODB_LZ4 STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required lz4 library is not found") - ENDIF() - ENDIF() - ENDIF() -ENDMACRO() diff --git a/cmake/lzma.cmake b/cmake/lzma.cmake deleted file mode 100644 index 12a28a17a43..00000000000 --- a/cmake/lzma.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2014, SkySQL Ab. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -SET(WITH_INNODB_LZMA AUTO CACHE STRING - "Build with lzma. Possible values are 'ON', 'OFF', 'AUTO' and default is 'AUTO'") - -MACRO (MYSQL_CHECK_LZMA) - IF (WITH_INNODB_LZMA STREQUAL "ON" OR WITH_INNODB_LZMA STREQUAL "AUTO") - CHECK_INCLUDE_FILES(lzma.h HAVE_LZMA_H) - CHECK_LIBRARY_EXISTS(lzma lzma_stream_buffer_decode "" HAVE_LZMA_DECODE) - CHECK_LIBRARY_EXISTS(lzma lzma_easy_buffer_encode "" HAVE_LZMA_ENCODE) - - IF (HAVE_LZMA_DECODE AND HAVE_LZMA_ENCODE AND HAVE_LZMA_H) - ADD_DEFINITIONS(-DHAVE_LZMA=1) - LINK_LIBRARIES(lzma) - ELSE() - IF (WITH_INNODB_LZMA STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required lzma library is not found") - ENDIF() - ENDIF() - ENDIF() -ENDMACRO() diff --git a/cmake/lzo.cmake b/cmake/lzo.cmake deleted file mode 100644 index 07cba011c06..00000000000 --- a/cmake/lzo.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (C) 2014, SkySQL Ab. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -SET(WITH_INNODB_LZO AUTO CACHE STRING - "Build with lzo. Possible values are 'ON', 'OFF', 'AUTO' and default is 'AUTO'") - -MACRO (MYSQL_CHECK_LZO_STATIC) - IF (WITH_INNODB_LZO STREQUAL "ON" OR WITH_INNODB_LZO STREQUAL "AUTO") - CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H) - CHECK_LIBRARY_EXISTS(liblzo2.a lzo1x_1_compress "" HAVE_LZO_LIB) - - IF(HAVE_LZO_LIB AND HAVE_LZO_H) - ADD_DEFINITIONS(-DHAVE_LZO=1) - LINK_LIBRARIES(liblzo2.a) - ELSE() - IF (WITH_INNODB_LZO STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required lzo library is not found") - ENDIF() - ENDIF() - ENDIF() -ENDMACRO() - -MACRO (MYSQL_CHECK_LZO) - IF (WITH_INNODB_LZO STREQUAL "ON" OR WITH_INNODB_LZO STREQUAL "AUTO") - CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H) - CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress "" HAVE_LZO_SHARED_LIB) - - IF(HAVE_LZO_SHARED_LIB AND HAVE_LZO_H) - ADD_DEFINITIONS(-DHAVE_LZO=1) - LINK_LIBRARIES(lzo2) - ELSE() - IF (WITH_INNODB_LZO STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required lzo library is not found") - ENDIF() - ENDIF() - ENDIF() -ENDMACRO() diff --git a/cmake/mysql_add_executable.cmake b/cmake/mysql_add_executable.cmake index c8027eeea51..de4d49a7cd1 100644 --- a/cmake/mysql_add_executable.cmake +++ b/cmake/mysql_add_executable.cmake @@ -39,6 +39,14 @@ FUNCTION (MYSQL_ADD_EXECUTABLE) SET(sources ${ARG_UNPARSED_ARGUMENTS}) ADD_VERSION_INFO(${target} EXECUTABLE sources) + + IF(MSVC) + # Add compatibility manifest, to fix GetVersionEx on Windows 8.1 and later + IF (CMAKE_VERSION VERSION_GREATER 3.3) + SET(sources ${sources} ${PROJECT_SOURCE_DIR}/cmake/win_compatibility.manifest) + ENDIF() + ENDIF() + IF (ARG_WIN32) SET(WIN32 WIN32) ELSE() diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index 7e9adfd1218..edbd2065f82 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -186,8 +186,11 @@ MACRO(MYSQL_ADD_PLUGIN) ADD_LIBRARY(${target} MODULE ${SOURCES}) DTRACE_INSTRUMENT(${target}) - SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX "" - COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN") + SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX "") + IF (NOT ARG_CLIENT) + SET_TARGET_PROPERTIES (${target} PROPERTIES + COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN") + ENDIF() TARGET_LINK_LIBRARIES (${target} mysqlservices ${ARG_LINK_LIBRARIES}) diff --git a/cmake/snappy.cmake b/cmake/snappy.cmake deleted file mode 100644 index cb0839a3480..00000000000 --- a/cmake/snappy.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2015, MariaDB Corporation. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -SET(WITH_INNODB_SNAPPY AUTO CACHE STRING - "Build with snappy. Possible values are 'ON', 'OFF', 'AUTO' and default is 'AUTO'") - -MACRO (MYSQL_CHECK_SNAPPY) - IF (WITH_INNODB_SNAPPY STREQUAL "ON" OR WITH_INNODB_SNAPPY STREQUAL "AUTO") - CHECK_INCLUDE_FILES(snappy-c.h HAVE_SNAPPY_H) - CHECK_LIBRARY_EXISTS(snappy snappy_uncompress "" HAVE_SNAPPY_SHARED_LIB) - - IF(HAVE_SNAPPY_SHARED_LIB AND HAVE_SNAPPY_H) - ADD_DEFINITIONS(-DHAVE_SNAPPY=1) - LINK_LIBRARIES(snappy) - ELSE() - IF (WITH_INNODB_SNAPPY STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required snappy library is not found") - ENDIF() - ENDIF() - ENDIF() -ENDMACRO() diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake index 9b51fb76799..841b52280e2 100644 --- a/cmake/systemd.cmake +++ b/cmake/systemd.cmake @@ -18,7 +18,7 @@ INCLUDE(FindPkgConfig) MACRO(CHECK_SYSTEMD) IF(UNIX) - SET(WITH_SYSTEMD "auto" CACHE STRING "Compile with systemd socket activation and notification") + SET(WITH_SYSTEMD "auto" CACHE STRING "Enable systemd scripts and notification support") IF(WITH_SYSTEMD STREQUAL "yes" OR WITH_SYSTEMD STREQUAL "auto") IF(PKG_CONFIG_FOUND) IF(WITH_SYSTEMD STREQUAL "yes") diff --git a/cmake/win_compatibility.manifest b/cmake/win_compatibility.manifest new file mode 100644 index 00000000000..2e4b27a6dc4 --- /dev/null +++ b/cmake/win_compatibility.manifest @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!-- Windows Vista and Windows Server 2008 --> + <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> + + <!-- Windows 7 and Windows Server 2008 R2 --> + <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> + + <!-- Windows 8 and Windows Server 2012 --> + <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> + + <!-- Windows 8.1 and Windows Server 2012 R2 --> + <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> + + <!-- Windows 10 --> + <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> + + </application> + </compatibility> +</asmv1:assembly> |