Commit df2d0359 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 83bb5da5
......@@ -54,12 +54,14 @@ IF(WITH_DEBUG_FULL)
SET(WITH_DEBUG ON CACHE BOOL "Use DBUG")
ENDIF()
PROJECT(MySQL)
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()
PROJECT(MySQL)
IF(CYGWIN)
SET(WIN32 0)
ENDIF()
......
......@@ -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()
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
......
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