mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
Added AIX, OS400 and Cygwin.
This finishes of moving code from configure.cmake IF()'s to platform specific files
This commit is contained in:
parent
864c885511
commit
8d74e5c50e
5 changed files with 78 additions and 30 deletions
|
@ -28,5 +28,9 @@ EXTRA_DIST = \
|
|||
os/Linux.cmake \
|
||||
os/SunOS.cmake \
|
||||
os/Darwin.cmake \
|
||||
os/HP-UX.cmake
|
||||
os/HP-UX.cmake \
|
||||
os/AIX.cmake \
|
||||
os/OS400.cmake \
|
||||
os/Cygwin.cmake
|
||||
|
||||
|
||||
|
|
33
cmake/os/AIX.cmake
Normal file
33
cmake/os/AIX.cmake
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Copyright (C) 2010 Sun Microsystems, Inc
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
#Enable 64 bit file offsets
|
||||
SET(_LARGE_FILES 1)
|
||||
|
||||
# Fix xlC oddity - it complains about same inline function defined multiple times
|
||||
# in different compilation units
|
||||
INCLUDE(CheckCXXCompilerFlag)
|
||||
CHECK_CXX_COMPILER_FLAG("-qstaticinline" HAVE_QSTATICINLINE)
|
||||
IF(HAVE_QSTATICINLINE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qstaticinline")
|
||||
ENDIF()
|
||||
|
||||
# The following is required to export all symbols
|
||||
# (also with leading underscore)
|
||||
STRING(REPLACE "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS
|
||||
${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}")
|
||||
STRING(REPLACE "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS
|
||||
"${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")
|
17
cmake/os/Cygwin.cmake
Normal file
17
cmake/os/Cygwin.cmake
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Copyright (C) 2010 Sun Microsystems, Inc
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Cygwin is not Windows
|
||||
SET(WIN32 0)
|
17
cmake/os/OS400.cmake
Normal file
17
cmake/os/OS400.cmake
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Copyright (C) 2010 Sun Microsystems, Inc
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
GET_FILENAME_COMPONENT(_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
INCLUDE(${_SCRIPT_DIR}/AIX.cmake)
|
|
@ -25,10 +25,8 @@ INCLUDE (CheckCSourceRuns)
|
|||
INCLUDE (CheckSymbolExists)
|
||||
|
||||
|
||||
# Sometimes it is handy to know if PIC option
|
||||
# is set, to avoid recompilation of the same source
|
||||
# for shared libs. We also allow it as an option for
|
||||
# fast compile.
|
||||
# WITH_PIC options.Not of much use, PIC is taken care of on platforms
|
||||
# where it makes sense anyway.
|
||||
IF(UNIX)
|
||||
IF(APPLE)
|
||||
# OSX executable are always PIC
|
||||
|
@ -76,19 +74,13 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
|||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
# Large files
|
||||
SET(_LARGEFILE_SOURCE 1)
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "AIX" OR CMAKE_SYSTEM_NAME MATCHES "OS400")
|
||||
SET(_LARGE_FILES 1)
|
||||
ENDIF()
|
||||
|
||||
# Figure out what engines to build and how (statically or dynamically),
|
||||
# add preprocessor defines for storage engines.
|
||||
IF(WITHOUT_DYNAMIC_PLUGINS)
|
||||
MESSAGE("Dynamic plugins are disabled.")
|
||||
ENDIF(WITHOUT_DYNAMIC_PLUGINS)
|
||||
|
||||
# Large files, common flag
|
||||
SET(_LARGEFILE_SOURCE 1)
|
||||
|
||||
|
||||
# Searches function in libraries
|
||||
# if function is found, sets output parameter result to the name of the library
|
||||
|
@ -112,6 +104,7 @@ FUNCTION(MY_SEARCH_LIBS func libs result)
|
|||
ENDFOREACH()
|
||||
ENDFUNCTION()
|
||||
|
||||
# Find out which libraries to use.
|
||||
IF(UNIX)
|
||||
MY_SEARCH_LIBS(floor m LIBM)
|
||||
IF(NOT LIBM)
|
||||
|
@ -955,22 +948,6 @@ SET(NO_ALARM "${HAVE_SOCKET_TIMEOUT}" CACHE BOOL
|
|||
"No need to use alarm to implement socket timeout")
|
||||
MARK_AS_ADVANCED(NO_ALARM)
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400")
|
||||
# xlC oddity - it complains about same inline function defined multiple times
|
||||
# in different compilation units
|
||||
INCLUDE(CheckCXXCompilerFlag)
|
||||
CHECK_CXX_COMPILER_FLAG("-qstaticinline" HAVE_QSTATICINLINE)
|
||||
IF(HAVE_QSTATICINLINE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qstaticinline")
|
||||
ENDIF()
|
||||
|
||||
# The following is required to export all symbols
|
||||
# (also with leading underscore)
|
||||
STRING(REPLACE "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS
|
||||
${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS})
|
||||
STRING(REPLACE "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS
|
||||
${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
IF(WITH_ATOMIC_OPS STREQUAL "up")
|
||||
|
|
Loading…
Reference in a new issue