Commit d02f318f authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

merge

parents 97cf0053 787b04d1
...@@ -19,9 +19,6 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) ...@@ -19,9 +19,6 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6)
CMAKE_POLICY(VERSION 2.8) CMAKE_POLICY(VERSION 2.8)
endif() endif()
IF(BUILD_CONFIG)
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
ENDIF()
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
...@@ -31,7 +28,7 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) ...@@ -31,7 +28,7 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
# is given, set CMAKE_BUILD_TYPE = Debug. Otherwise, use Relwithdebinfo. # is given, set CMAKE_BUILD_TYPE = Debug. Otherwise, use Relwithdebinfo.
IF(CMAKE_BUILD_TYPE) IF(DEFINED CMAKE_BUILD_TYPE)
SET(HAVE_CMAKE_BUILD_TYPE TRUE) SET(HAVE_CMAKE_BUILD_TYPE TRUE)
ENDIF() ENDIF()
SET(CUSTOM_C_FLAGS $ENV{CFLAGS}) SET(CUSTOM_C_FLAGS $ENV{CFLAGS})
...@@ -42,19 +39,27 @@ ENDIF() ...@@ -42,19 +39,27 @@ ENDIF()
OPTION(WITH_DEBUG "Use dbug" OFF) OPTION(WITH_DEBUG "Use dbug" OFF)
OPTION(WITH_DEBUG_FULL "Use dbug and safemalloc/safemutex. Slow" OFF) OPTION(WITH_DEBUG_FULL "Use dbug and safemalloc/safemutex. Slow" OFF)
IF(NOT HAVE_CMAKE_BUILD_TYPE AND NOT CUSTOM_C_FLAGS) IF(NOT HAVE_CMAKE_BUILD_TYPE)
IF(WITH_DEBUG) IF(BUILD_CONFIG OR NOT CUSTOM_C_FLAGS)
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Debug build" FORCE) IF(WITH_DEBUG)
ELSE() SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Debug build" FORCE)
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "RelWithDebInfo build" FORCE) ELSE()
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"RelWithDebInfo build" FORCE)
ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(WITH_DEBUG_FULL) IF(WITH_DEBUG_FULL)
SET(WITH_DEBUG ON CACHE BOOL "Use DBUG") SET(WITH_DEBUG ON CACHE BOOL "Use DBUG")
ENDIF() ENDIF()
PROJECT(MySQL) PROJECT(MySQL)
IF(BUILD_CONFIG)
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
ENDIF()
IF(CYGWIN) IF(CYGWIN)
SET(WIN32 0) SET(WIN32 0)
ENDIF() ENDIF()
......
# Copyright (C) 2010 Sun Microsystems, Inc # Copyright (C) 2010 Sun Microsystems, Inc
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. # the Free Software Foundation; version 2 of the License.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This file includes build settings used for MySQL release # This file includes build settings used for MySQL release
SET(WITH_INNOBASE_STORAGE_ENGINE 1) SET(WITH_INNOBASE_STORAGE_ENGINE 1)
SET(WITH_ARCHIVE_STORAGE_ENGINE 1) SET(WITH_ARCHIVE_STORAGE_ENGINE 1)
SET(WITH_BLACKHOLE_STORAGE_ENGINE 1) SET(WITH_BLACKHOLE_STORAGE_ENGINE 1)
SET(WITH_FEDERATED_STORAGE_ENGINE 1) SET(WITH_FEDERATED_STORAGE_ENGINE 1)
SET(WITHOUT_EXAMPLE_STORAGE_ENGINE 1) SET(WITHOUT_EXAMPLE_STORAGE_ENGINE 1)
SET(WITH_EMBEDDED_SERVER 1) SET(WITH_EMBEDDED_SERVER 1)
SET(ENABLE_LOCAL_INFILE TRUE) SET(ENABLE_LOCAL_INFILE TRUE)
SET(WITH_SSL bundled) SET(WITH_SSL bundled)
SET(WITH_ZLIB bundled) SET(WITH_ZLIB bundled)
IF(NOT COMPILATION_COMMENT) IF(NOT COMPILATION_COMMENT)
SET(COMPILATION_COMMENT "MySQL Community Server (GPL)") SET(COMPILATION_COMMENT "MySQL Community Server (GPL)")
ENDIF() 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)
SET(WITH_READLINE TRUE) SET(WITH_READLINE TRUE)
SET(WITH_PIC TRUE) SET(WITH_PIC TRUE)
# Default GCC flags # Default GCC flags
IF(CMAKE_C_COMPILER_IS_GNUCXX) IF(CMAKE_C_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()
# HPUX flags # HPUX flags
IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX") IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
IF(CMAKE_C_COMPILER_ID MATCHES "HP") IF(CMAKE_C_COMPILER_ID MATCHES "HP")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64") IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -AC99") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -AC99")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -Aa") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -Aa")
ENDIF() ENDIF()
ENDIF() ENDIF()
SET(WITH_SSL) SET(WITH_SSL)
ENDIF() ENDIF()
# Linux flags # Linux flags
IF(CMAKE_SYSTEM_NAME MATCHES "Linux") IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
IF(CMAKE_C_COMPILER_ID MATCHES "Intel") IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
ENDIF() ENDIF()
ENDIF() ENDIF()
# OSX flags # OSX flags
IF(APPLE) IF(APPLE)
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_C_FLAGS_RELWITHDEBINFO}") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
ENDIF() ENDIF()
# Solaris flags # Solaris flags
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS") IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
IF(CMAKE_C_COMPILER_ID MATCHES "SunPro") IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386") IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
IF(CMAKE_SIZEOF_VOIDP EQUAL 4) IF(CMAKE_SIZEOF_VOIDP EQUAL 4)
# 32 bit - optinmization is -xO2 # 32 bit - optinmization is -xO2
SET(CMAKE_C_FLAGS_RELWITHDEBINFO SET(CMAKE_C_FLAGS_RELWITHDEBINFO
"-g -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic") "-g -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-g0 -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic") "-g0 -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
ELSE() ELSE()
# 64 bit - optimization is -xO3 # 64 bit - optimization is -xO3
SET(CMAKE_C_FLAGS_RELWITHDEBINFO SET(CMAKE_C_FLAGS_RELWITHDEBINFO
"-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic") "-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-g0 -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic") "-g0 -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
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