diff options
-rw-r--r-- | cmake/Makefile.am | 6 | ||||
-rw-r--r-- | cmake/os/AIX.cmake | 33 | ||||
-rw-r--r-- | cmake/os/Cygwin.cmake | 17 | ||||
-rw-r--r-- | cmake/os/OS400.cmake | 17 | ||||
-rw-r--r-- | configure.cmake | 35 |
5 files changed, 78 insertions, 30 deletions
diff --git a/cmake/Makefile.am b/cmake/Makefile.am index c8341cb14cb..e136ac89d69 100644 --- a/cmake/Makefile.am +++ b/cmake/Makefile.am @@ -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 + diff --git a/cmake/os/AIX.cmake b/cmake/os/AIX.cmake new file mode 100644 index 00000000000..b1b2cebdd14 --- /dev/null +++ b/cmake/os/AIX.cmake @@ -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}")
\ No newline at end of file diff --git a/cmake/os/Cygwin.cmake b/cmake/os/Cygwin.cmake new file mode 100644 index 00000000000..5b2d82c19b8 --- /dev/null +++ b/cmake/os/Cygwin.cmake @@ -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)
\ No newline at end of file diff --git a/cmake/os/OS400.cmake b/cmake/os/OS400.cmake new file mode 100644 index 00000000000..b8cad2917f9 --- /dev/null +++ b/cmake/os/OS400.cmake @@ -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)
\ No newline at end of file diff --git a/configure.cmake b/configure.cmake index 016ae359486..8a2a1f0ad78 100644 --- a/configure.cmake +++ b/configure.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") |