From: magnus.blaudd Date: May 24 2011 11:42am Subject: bzr push into mysql-5.1-telco-7.1 branch (magnus.blaudd:4218 to 4219) List-Archive: http://lists.mysql.com/commits/137976 Message-Id: <20110524114229.E544513402B@pilot> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4219 magnus.blaudd@stripped 2011-05-24 [merge] Merge 7.0 -> 7.1 added: storage/ndb/cmake/os/ storage/ndb/cmake/os/Windows.cmake storage/ndb/cmake/os/WindowsCache.cmake modified: CMakeLists.txt storage/ndb/ndb_configure.cmake 4218 jonas oreland 2011-05-24 [merge] ndb - merge 70 to 71 === modified file 'CMakeLists.txt' --- a/CMakeLists.txt 2011-05-12 14:13:43 +0000 +++ b/CMakeLists.txt 2011-05-24 08:33:20 +0000 @@ -327,19 +327,3 @@ IF(WITH_EMBEDDED_SERVER) ENDIF(WITH_EMBEDDED_SERVER) ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess) -# Dump cmake's output and error log to help diagnosing -# platform checks -MACRO(DUMP_FILE filename) - IF(EXISTS ${filename}) - FILE(READ ${filename} content) - MESSAGE(STATUS "=vvvv= Dumping ${filename} ") - MESSAGE(STATUS "${content}") - MESSAGE(STATUS "=^^^^=") - ELSE() - MESSAGE(STATUS "'${filename}' does not exist") - ENDIF() -ENDMACRO() - -DUMP_FILE("${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log") -DUMP_FILE("${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log") - === added directory 'storage/ndb/cmake/os' === added file 'storage/ndb/cmake/os/Windows.cmake' --- a/storage/ndb/cmake/os/Windows.cmake 1970-01-01 00:00:00 +0000 +++ b/storage/ndb/cmake/os/Windows.cmake 2011-05-24 08:45:38 +0000 @@ -0,0 +1,23 @@ +# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +# +# 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 +# + + +# avoid running system checks by using pre-cached check results +# system checks are expensive on VS since every tiny program is to be compiled in +# a VC solution. +GET_FILENAME_COMPONENT(_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) +INCLUDE(${_SCRIPT_DIR}/WindowsCache.cmake) + === added file 'storage/ndb/cmake/os/WindowsCache.cmake' --- a/storage/ndb/cmake/os/WindowsCache.cmake 1970-01-01 00:00:00 +0000 +++ b/storage/ndb/cmake/os/WindowsCache.cmake 2011-05-24 08:45:38 +0000 @@ -0,0 +1,66 @@ +# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +# +# 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 +# + +# Avoid system checks on Windows by pre-caching results. Most of the system checks +# are not relevant for Windows anyway and it takes lot more time to run them, +# since CMake to creates a Visual Studio project for each tiny test. +# Note that values are cached for VC++ only, MinGW would give slightly +# different results. + + +IF(MSVC) +SET(HAVE_POSIX_MEMALIGN CACHE INTERNAL "") +SET(HAVE_CLOCK_GETTIME CACHE INTERNAL "") +SET(HAVE_PTHREAD_CONDATTR_SETCLOCK CACHE INTERNAL "") +SET(HAVE_PTHREAD_SELF CACHE INTERNAL "") +SET(HAVE_SCHED_GET_PRIORITY_MIN CACHE INTERNAL "") +SET(HAVE_SCHED_GET_PRIORITY_MAX CACHE INTERNAL "") +SET(HAVE_SCHED_SETAFFINITY CACHE INTERNAL "") +SET(HAVE_SCHED_SETSCHEDULER CACHE INTERNAL "") +SET(HAVE_PROCESSOR_BIND CACHE INTERNAL "") +SET(HAVE_EPOLL_CREATE CACHE INTERNAL "") +SET(HAVE_MEMALIGN CACHE INTERNAL "") +SET(HAVE_SYSCONF CACHE INTERNAL "") +SET(HAVE_DIRECTIO CACHE INTERNAL "") +SET(HAVE_ATOMIC_SWAP32 CACHE INTERNAL "") +SET(HAVE_MLOCK CACHE INTERNAL "") +SET(HAVE_FFS CACHE INTERNAL "") +SET(HAVE_PTHREAD_MUTEXATTR_INIT CACHE INTERNAL "") +SET(HAVE_PTHREAD_MUTEXATTR_SETTYPE CACHE INTERNAL "") +SET(HAVE_PTHREAD_SETSCHEDPARAM CACHE INTERNAL "") +SET(HAVE_SUN_PREFETCH_H CACHE INTERNAL "") +SET(HAVE___BUILTIN_FFS CACHE INTERNAL "") +SET(HAVE__BITSCANFORWARD 1 CACHE INTERNAL "") +SET(HAVE_LINUX_SCHEDULING CACHE INTERNAL "") +SET(HAVE_SOLARIS_AFFINITY CACHE INTERNAL "") +SET(HAVE_LINUX_FUTEX CACHE INTERNAL "") +SET(HAVE_ATOMIC_H CACHE INTERNAL "") + +SET(NDB_SIZEOF_CHAR 1 CACHE INTERNAL "") +SET(HAVE_NDB_SIZEOF_CHAR TRUE CACHE INTERNAL "") +SET(NDB_SIZEOF_CHARP ${CMAKE_SIZEOF_VOID_P} CACHE INTERNAL "") +SET(HAVE_NDB_SIZEOF_CHARP TRUE CACHE INTERNAL "") +SET(NDB_SIZEOF_INT 4 CACHE INTERNAL "") +SET(HAVE_NDB_SIZEOF_INT TRUE CACHE INTERNAL "") +SET(NDB_SIZEOF_LONG 4 CACHE INTERNAL "") +SET(HAVE_NDB_SIZEOF_LONG TRUE CACHE INTERNAL "") +SET(NDB_SIZEOF_LONG_LONG 8 CACHE INTERNAL "") +SET(HAVE_NDB_SIZEOF_LONG_LONG TRUE CACHE INTERNAL "") +SET(NDB_SIZEOF_SHORT 2 CACHE INTERNAL "") +SET(HAVE_NDB_SIZEOF_SHORT TRUE CACHE INTERNAL "") + +SET(NDB_BUILD_NDBMTD 1 CACHE INTERNAL "") +ENDIF() === modified file 'storage/ndb/ndb_configure.cmake' --- a/storage/ndb/ndb_configure.cmake 2011-03-15 15:50:34 +0000 +++ b/storage/ndb/ndb_configure.cmake 2011-05-24 08:45:38 +0000 @@ -18,6 +18,26 @@ # # Run platform checks and create ndb_config.h # + + +# Include the platform-specific file. To allow exceptions, this code +# looks for files in order of how specific they are. If there is, for +# example, a generic Linux.cmake and a version-specific +# Linux-2.6.28-11-generic, it will pick Linux-2.6.28-11-generic and +# include it. It is then up to the file writer to include the generic +# version if necessary. +FOREACH(_base + ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}-${CMAKE_SYSTEM_PROCESSOR} + ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION} + ${CMAKE_SYSTEM_NAME}) + SET(_file ${CMAKE_CURRENT_SOURCE_DIR}/cmake/os/${_base}.cmake) + IF(EXISTS ${_file}) + INCLUDE(${_file}) + BREAK() + ENDIF() +ENDFOREACH() + + INCLUDE(CheckFunctionExists) INCLUDE(CheckIncludeFiles) INCLUDE(CheckCSourceCompiles) @@ -31,7 +51,7 @@ CHECK_FUNCTION_EXISTS(pthread_condattr_s CHECK_FUNCTION_EXISTS(pthread_self HAVE_PTHREAD_SELF) CHECK_FUNCTION_EXISTS(sched_get_priority_min HAVE_SCHED_GET_PRIORITY_MIN) CHECK_FUNCTION_EXISTS(sched_get_priority_max HAVE_SCHED_GET_PRIORITY_MAX) -CHECK_FUNCTION_EXISTS(sched_setaffinity HAVE_SCHED_SETAFFINTIY) +CHECK_FUNCTION_EXISTS(sched_setaffinity HAVE_SCHED_SETAFFINITY) CHECK_FUNCTION_EXISTS(sched_setscheduler HAVE_SCHED_SETSCHEDULER) CHECK_FUNCTION_EXISTS(processor_bind HAVE_PROCESSOR_BIND) CHECK_FUNCTION_EXISTS(epoll_create HAVE_EPOLL_CREATE) @@ -153,7 +173,8 @@ IF(WITH_NDBMTD) return a; }" NDB_BUILD_NDBMTD) - +ELSE() + SET(NDB_BUILD_NDBMTD CACHE INTERNAL "") ENDIF() SET(WITH_NDB_PORT "" CACHE INTEGER No bundle (reason: useless for push emails).