Skip to content

Commit

Permalink
Merge remote-tracking branch 'percona/release-8.0.40-31' into '8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
inikep committed Dec 3, 2024
2 parents ed881ad + 4931786 commit f01c613
Show file tree
Hide file tree
Showing 1,975 changed files with 60,377 additions and 52,489 deletions.
13 changes: 2 additions & 11 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

# We currently use clang-format version 10.
# We currently use clang-format version 15.
#
# This is the output of
#
Expand Down Expand Up @@ -98,15 +98,13 @@ ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
Expand Down Expand Up @@ -146,7 +144,6 @@ PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
RawStringFormats:
- Language: Cpp
Delimiters:
Expand Down Expand Up @@ -197,7 +194,6 @@ SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Auto
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
Expand All @@ -210,8 +206,7 @@ UseTab: Never
DerivePointerAlignment: false
PointerAlignment: Right

# MySQL source code is allowed to use C++11 (and C++14) features.
Standard: Cpp11
Standard: Latest

# MySQL includes frequently are not order-independent (e.g. my_config.h needs
# to go on top). This is unfortunate, but not something we can change easily,
Expand Down Expand Up @@ -277,15 +272,13 @@ ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
Expand Down Expand Up @@ -325,7 +318,6 @@ PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
RawStringFormats:
- Language: Cpp
Delimiters:
Expand Down Expand Up @@ -376,7 +368,6 @@ SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Auto
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
Expand Down
63 changes: 45 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ELSEIF(APPLE)
# We must postpone the version test until we have called 'uname -r' below.
ELSEIF(UNIX)
# This is currently minimum version on all supported platforms.
IF(CMAKE_VERSION VERSION_LESS 3.5.1)
IF(CMAKE_VERSION VERSION_LESS 3.11.2)
# Default cmake is 2.8.12.2 on RedHat
IF(EXISTS "/etc/redhat-release")
MESSAGE(WARNING "Please use cmake3 rather than cmake on this platform")
Expand Down Expand Up @@ -241,8 +241,8 @@ IF(APPLE)
ENDIF()

# Add all policies *after* CMAKE_MINIMUM_REQUIRED
# Repeating CMAKE_MINIMUM_REQUIRED here will load defaults for 3.5.1
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
# Repeating CMAKE_MINIMUM_REQUIRED here will load defaults for 3.11.2
CMAKE_MINIMUM_REQUIRED(VERSION 3.11.2)
INCLUDE(cmake_policies NO_POLICY_SCOPE)

MACRO(STRING_APPEND STRING_VAR INPUT)
Expand Down Expand Up @@ -473,16 +473,16 @@ IF(CMAKE_HOST_UNIX AND NOT FORCE_UNSUPPORTED_COMPILER
NO_DEFAULT_PATH
PATHS "/usr/bin")
ELSEIF(LINUX_SUSE_15)
FIND_PROGRAM(ALTERNATIVE_GCC gcc-9
FIND_PROGRAM(ALTERNATIVE_GCC gcc-13
NO_DEFAULT_PATH
PATHS "/usr/bin")
FIND_PROGRAM(ALTERNATIVE_GPP g++-9
FIND_PROGRAM(ALTERNATIVE_GPP g++-13
NO_DEFAULT_PATH
PATHS "/usr/bin")
FIND_PROGRAM(GCC_AR_EXECUTABLE gcc-ar-9
FIND_PROGRAM(GCC_AR_EXECUTABLE gcc-ar-13
NO_DEFAULT_PATH
PATHS "/usr/bin")
FIND_PROGRAM(GCC_RANLIB_EXECUTABLE gcc-ranlib-9
FIND_PROGRAM(GCC_RANLIB_EXECUTABLE gcc-ranlib-13
NO_DEFAULT_PATH
PATHS "/usr/bin")
ENDIF()
Expand Down Expand Up @@ -510,7 +510,7 @@ IF(CMAKE_HOST_UNIX AND NOT FORCE_UNSUPPORTED_COMPILER
MESSAGE(FATAL_ERROR "Please do zypper install gcc10 gcc10-c++\n"
"or set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER explicitly.")
ELSE()
MESSAGE(FATAL_ERROR "Please do zypper install gcc9 gcc9-c++\n"
MESSAGE(FATAL_ERROR "Please do zypper install gcc13 gcc13-c++\n"
"or set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER explicitly.")
ENDIF()
ENDIF()
Expand Down Expand Up @@ -599,6 +599,31 @@ INCLUDE(mysql_version)
PROJECT(${MYSQL_PROJECT_NAME}
VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})

# Various 3rd party libraries have this option.
# Some have it ON, other OFF, by default.
# https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html:
# "the top level project must also call option(BUILD_SHARED_LIBS ...)
# before bringing in its dependencies."
# We want all libraries to be explicitly STATIC or SHARED.
OPTION(BUILD_SHARED_LIBS "Build shared libraries by default" OFF)
IF(BUILD_SHARED_LIBS)
MESSAGE(WARNING "Do not set BUILD_SHARED_LIBS to ON/TRUE")
SET(BUILD_SHARED_LIBS OFF)
SET(BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
ENDIF()

# https://cmake.org/cmake/help/latest/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.html
OPTION(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
"Target 'install' does not depend on 'all'" OFF)
IF(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY)
MESSAGE(WARNING "Do not set CMAKE_SKIP_INSTALL_ALL_DEPENDENCY to ON/TRUE")
SET(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY OFF)
SET(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY OFF CACHE INTERNAL "" FORCE)
ENDIF()

# Ninja only: List of available pools.
SET_PROPERTY(GLOBAL PROPERTY JOB_POOLS one_job=1)

GET_FILENAME_COMPONENT(REALPATH_CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR} REALPATH)
GET_FILENAME_COMPONENT(REALPATH_CMAKE_BINARY_DIR ${CMAKE_BINARY_DIR} REALPATH)

Expand Down Expand Up @@ -1291,7 +1316,7 @@ IF(USE_LD_LLD)
ENDIF()
SET(USING_LD_LLD ${USING_LD_LLD} CACHE INTERNAL "")

IF(LINUX_STANDALONE)
IF(LINUX_STANDALONE OR SOLARIS)
# ON by default in pushbuild, but only for standalone builds.
# The comression does not play well with some RPM/DEB packaging.
# Developers can set default in environment.
Expand Down Expand Up @@ -1326,12 +1351,16 @@ ENDIF()
IF(UNIX AND MY_COMPILER_IS_GNU_OR_CLANG)
# By default, do this for STANDALONE and tarball builds.
# Off by default for sanitizer or valgrind builds.
# Off by default in pushbuild.
# Off by default for Apple Clang.
IF((INSTALL_LAYOUT MATCHES "STANDALONE" OR
INSTALL_LAYOUT MATCHES "TARGZ" OR
INSTALL_LAYOUT MATCHES "SVR4"
# ON by default for SOLARIS (also in PB2), to reduce package sizes.
IF(SOLARIS)
SET(MINIMAL_RELWITHDEBINFO_DEFAULT ON)
ELSEIF((INSTALL_LAYOUT MATCHES "STANDALONE" OR
INSTALL_LAYOUT MATCHES "TARGZ"
)
AND NOT CMAKE_COMPILER_FLAG_WITH_SANITIZE AND NOT WITH_VALGRIND
AND NOT DEFINED ENV{PB2WORKDIR}
AND NOT APPLE)
SET(MINIMAL_RELWITHDEBINFO_DEFAULT ON)
ELSE()
Expand Down Expand Up @@ -1625,7 +1654,6 @@ ENDIF()
INCLUDE(configure.cmake)

# Common defines and includes
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
ADD_DEFINITIONS(-D__STDC_LIMIT_MACROS) # Enable C99 limit macros
ADD_DEFINITIONS(-D__STDC_FORMAT_MACROS) # Enable C99 printf format macros
ADD_DEFINITIONS(-D_USE_MATH_DEFINES) # Get access to M_PI, M_E, etc. in math.h
Expand Down Expand Up @@ -2086,9 +2114,8 @@ ENDIF()
IF(WITH_SSL_PATH AND (LINUX_RHEL8 OR LINUX_RHEL9))
SET(WITH_TIRPC "bundled")
ENDIF()

IF(WITH_TIRPC STREQUAL "bundled")
ADD_SUBDIRECTORY(extra/tirpc)
IF(LINUX)
MYSQL_CHECK_RPC()
ENDIF()

IF(WITH_PROTOBUF STREQUAL "bundled" OR WITH_FIDO STREQUAL "bundled")
Expand All @@ -2114,8 +2141,8 @@ IF(WITH_PROTOBUF STREQUAL "bundled" OR WITH_FIDO STREQUAL "bundled")
# Silence warning about CMP0075
CMAKE_PUSH_CHECK_STATE()
SET(CMAKE_REQUIRED_LIBRARIES)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${CBOR_BUNDLE_SRC_PATH})
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${FIDO_BUNDLE_SRC_PATH})
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/extra/libcbor)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/extra/libfido2)
CMAKE_POP_CHECK_STATE()
ENDIF()
ENDIF()
Expand Down
Loading

0 comments on commit f01c613

Please sign in to comment.