mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
- another take on BUILD_CONFIG variable - use OPTION instead of SET for
boolean variables to ensure option is in cache. Also use documented CMAKE_USE_MAKE_RULES_OVERRIDE feature instead of INCLUDE. - remove superfluous tests in innobase's CMakeLists.txt
This commit is contained in:
parent
7753db1d17
commit
a71e4cf18e
3 changed files with 25 additions and 32 deletions
|
@ -54,11 +54,13 @@ IF(WITH_DEBUG_FULL)
|
|||
SET(WITH_DEBUG ON CACHE BOOL "Use DBUG")
|
||||
ENDIF()
|
||||
|
||||
IF(BUILD_CONFIG)
|
||||
SET(CMAKE_USER_MAKE_RULES_OVERRIDE
|
||||
${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
|
||||
ENDIF()
|
||||
|
||||
PROJECT(MySQL)
|
||||
|
||||
IF(BUILD_CONFIG)
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
|
||||
ENDIF()
|
||||
|
||||
IF(CYGWIN)
|
||||
SET(WIN32 0)
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
|
||||
# This file includes build settings used for MySQL release
|
||||
|
||||
SET(WITH_INNOBASE_STORAGE_ENGINE 1)
|
||||
SET(WITH_ARCHIVE_STORAGE_ENGINE 1)
|
||||
SET(WITH_BLACKHOLE_STORAGE_ENGINE 1)
|
||||
SET(WITH_FEDERATED_STORAGE_ENGINE 1)
|
||||
SET(WITHOUT_EXAMPLE_STORAGE_ENGINE 1)
|
||||
SET(WITH_EMBEDDED_SERVER 1)
|
||||
SET(ENABLE_LOCAL_INFILE TRUE)
|
||||
SET(WITH_SSL bundled)
|
||||
SET(WITH_ZLIB bundled)
|
||||
OPTION(WITH_INNOBASE_STORAGE_ENGINE "" ON)
|
||||
OPTION(WITH_ARCHIVE_STORAGE_ENGINE "" ON)
|
||||
OPTION(WITH_BLACKHOLE_STORAGE_ENGINE "" ON)
|
||||
OPTION(WITH_FEDERATED_STORAGE_ENGINE "" ON )
|
||||
OPTION(WITHOUT_EXAMPLE_STORAGE_ENGINE "" ON)
|
||||
OPTION(WITH_EMBEDDED_SERVER "" ON)
|
||||
OPTION(ENABLE_LOCAL_INFILE "" ON)
|
||||
SET(WITH_SSL bundled CACHE STRING "")
|
||||
SET(WITH_ZLIB bundled CACHE STRING "")
|
||||
|
||||
|
||||
IF(NOT COMPILATION_COMMENT)
|
||||
|
@ -32,12 +32,12 @@ ENDIF()
|
|||
|
||||
IF(UNIX)
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr/local/mysql")
|
||||
SET(WITH_EXTRA_CHARSETS complex)
|
||||
SET(WITH_READLINE TRUE)
|
||||
SET(WITH_PIC TRUE)
|
||||
SET(WITH_EXTRA_CHARSETS complex CACHE STRING "")
|
||||
OPTION(WITH_READLINE "" ON)
|
||||
OPTION(WITH_PIC "" ON)
|
||||
|
||||
# Default GCC flags
|
||||
IF(CMAKE_C_COMPILER_IS_GNUCXX)
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti")
|
||||
ENDIF()
|
||||
|
@ -89,4 +89,10 @@ IF(UNIX)
|
|||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
IF(CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
|
||||
CACHE STRING "Compile flags")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}"
|
||||
CACHE STRING "Compile flags")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
|
|
@ -163,21 +163,6 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
|||
ENDIF()
|
||||
|
||||
|
||||
IF(HAVE_GCC_ATOMIC_BUILTINS)
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
int main()
|
||||
{
|
||||
pthread_t x1;
|
||||
pthread_t x2;
|
||||
pthread_t x3;
|
||||
__sync_bool_compare_and_swap(&x1, x2, x3);
|
||||
return 0;
|
||||
}" HAVE_ATOMIC_PTHREAD_T_GCC
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(UNIX)
|
||||
# this is needed to know which one of atomic_cas_32() or atomic_cas_64()
|
||||
# to use in the source
|
||||
|
|
Loading…
Add table
Reference in a new issue