List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:May 24 2011 8:45am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4408)
View as plain text  
#At file:///C:/mysql/7.0/ based on revid:magnus.blaudd@oracle.com-20110524083445-5wnp7yg5uj7bg9in

 4408 Magnus Blåudd	2011-05-24
      ndb
       - add support for operating system specific platform checks for storage/ndb/ in a similar way
        as MySQL Server already have. I.e files in storage/ndb/os/ is included if their name match
       the current OS name, version and processor.
       - add precached settings for Windows to reduce the time it takes to run cmake on Windows and
        also improve reliability in the checks(build farm have shown random failures when running the checks
        large number times - if this is a build farm or cmake problem has not been determined)

    added:
      storage/ndb/cmake/os/
      storage/ndb/cmake/os/Windows.cmake
      storage/ndb/cmake/os/WindowsCache.cmake
    modified:
      storage/ndb/ndb_configure.cmake
=== 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-05-24 08:34:45 +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)
@@ -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

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20110524084538-s28i8oiqb077qxfr.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4408) Magnus Blåudd24 May