Commit 8d74e5c5 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Added AIX, OS400 and Cygwin.

This finishes of moving code from configure.cmake IF()'s to platform specific files
parent 864c8855
......@@ -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
# 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}")
\ No newline at end of file
# 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)
\ No newline at end of file
# 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)
\ No newline at end of file
......@@ -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")
......
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