Commit a71e4cf1 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

- 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
parent 7753db1d
...@@ -54,12 +54,14 @@ IF(WITH_DEBUG_FULL) ...@@ -54,12 +54,14 @@ IF(WITH_DEBUG_FULL)
SET(WITH_DEBUG ON CACHE BOOL "Use DBUG") SET(WITH_DEBUG ON CACHE BOOL "Use DBUG")
ENDIF() ENDIF()
PROJECT(MySQL)
IF(BUILD_CONFIG) IF(BUILD_CONFIG)
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake) SET(CMAKE_USER_MAKE_RULES_OVERRIDE
${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
ENDIF() ENDIF()
PROJECT(MySQL)
IF(CYGWIN) IF(CYGWIN)
SET(WIN32 0) SET(WIN32 0)
ENDIF() ENDIF()
......
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
# This file includes build settings used for MySQL release # This file includes build settings used for MySQL release
SET(WITH_INNOBASE_STORAGE_ENGINE 1) OPTION(WITH_INNOBASE_STORAGE_ENGINE "" ON)
SET(WITH_ARCHIVE_STORAGE_ENGINE 1) OPTION(WITH_ARCHIVE_STORAGE_ENGINE "" ON)
SET(WITH_BLACKHOLE_STORAGE_ENGINE 1) OPTION(WITH_BLACKHOLE_STORAGE_ENGINE "" ON)
SET(WITH_FEDERATED_STORAGE_ENGINE 1) OPTION(WITH_FEDERATED_STORAGE_ENGINE "" ON )
SET(WITHOUT_EXAMPLE_STORAGE_ENGINE 1) OPTION(WITHOUT_EXAMPLE_STORAGE_ENGINE "" ON)
SET(WITH_EMBEDDED_SERVER 1) OPTION(WITH_EMBEDDED_SERVER "" ON)
SET(ENABLE_LOCAL_INFILE TRUE) OPTION(ENABLE_LOCAL_INFILE "" ON)
SET(WITH_SSL bundled) SET(WITH_SSL bundled CACHE STRING "")
SET(WITH_ZLIB bundled) SET(WITH_ZLIB bundled CACHE STRING "")
IF(NOT COMPILATION_COMMENT) IF(NOT COMPILATION_COMMENT)
...@@ -32,12 +32,12 @@ ENDIF() ...@@ -32,12 +32,12 @@ ENDIF()
IF(UNIX) IF(UNIX)
SET(CMAKE_INSTALL_PREFIX "/usr/local/mysql") SET(CMAKE_INSTALL_PREFIX "/usr/local/mysql")
SET(WITH_EXTRA_CHARSETS complex) SET(WITH_EXTRA_CHARSETS complex CACHE STRING "")
SET(WITH_READLINE TRUE) OPTION(WITH_READLINE "" ON)
SET(WITH_PIC TRUE) OPTION(WITH_PIC "" ON)
# Default GCC flags # 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_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") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti")
ENDIF() ENDIF()
...@@ -89,4 +89,10 @@ IF(UNIX) ...@@ -89,4 +89,10 @@ IF(UNIX)
ENDIF() ENDIF()
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") ...@@ -163,21 +163,6 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
ENDIF() 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) IF(UNIX)
# this is needed to know which one of atomic_cas_32() or atomic_cas_64() # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
# to use in the source # to use in the source
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment