List:Commits« Previous MessageNext Message »
From:Mikael Ronstrom Date:July 1 2009 12:25pm
Subject:bzr commit into mysql-5.4 branch (mikael:2862)
View as plain text  
#At file:///home/mikael/mysql_clones/mysql-5.1-performance-version/

 2862 Mikael Ronstrom	2009-07-01
      Preparation for using CMake for more than Windows by only checking for WIN_ATOMICS32/64 on Windows
      modified:
        storage/innobase/CMakeLists.txt

=== modified file 'storage/innobase/CMakeLists.txt'
--- a/storage/innobase/CMakeLists.txt	2009-06-17 17:16:49 +0000
+++ b/storage/innobase/CMakeLists.txt	2009-07-01 12:25:30 +0000
@@ -25,27 +25,28 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studi
                               PROPERTIES COMPILE_FLAGS -Od)
 ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 8)
 
-IF (NOT WITHOUT_ATOMICS)
+IF (WIN32)
+  IF (NOT WITHOUT_ATOMICS)
 # Check if this Windows version supports atomic instructions
-  IF (CMAKE_SIZEOF_VOID_P MATCHES 8)
+    IF (CMAKE_SIZEOF_VOID_P MATCHES 8)
 # Check for 64 bit atomics
-    TRY_RUN(RUN_RES COMPILE_RES ${CMAKE_BINARY_DIR}
-            ${CMAKE_SOURCE_DIR}/storage/innobase/win_atomics64_test.c)
-    IF (COMPILE_RES AND NOT RUN_RES)
-      MESSAGE("Adding support for Win64 atomics")
-      ADD_DEFINITIONS(-DWIN_ATOMICS64)
-    ENDIF (COMPILE_RES AND NOT RUN_RES)
-  ELSE (CMAKE_SIZEOF_VOID_P MATCHES 8)
+      TRY_RUN(RUN_RES COMPILE_RES ${CMAKE_BINARY_DIR}
+              ${CMAKE_SOURCE_DIR}/storage/innobase/win_atomics64_test.c)
+      IF (COMPILE_RES AND NOT RUN_RES)
+        MESSAGE("Adding support for Win64 atomics")
+        ADD_DEFINITIONS(-DWIN_ATOMICS64)
+      ENDIF (COMPILE_RES AND NOT RUN_RES)
+    ELSE (CMAKE_SIZEOF_VOID_P MATCHES 8)
 # Check for 32 bit atomics
-    TRY_RUN(RUN_RES COMPILE_RES ${CMAKE_BINARY_DIR}
-            ${CMAKE_SOURCE_DIR}/storage/innobase/win_atomics32_test.c)
-    IF (COMPILE_RES AND NOT RUN_RES)
-      MESSAGE("Adding support for Win32 atomics")
-      ADD_DEFINITIONS(-DWIN_ATOMICS32)
-    ENDIF (COMPILE_RES AND NOT RUN_RES)
-  ENDIF (CMAKE_SIZEOF_VOID_P MATCHES 8)
-ENDIF (NOT WITHOUT_ATOMICS)
-
+      TRY_RUN(RUN_RES COMPILE_RES ${CMAKE_BINARY_DIR}
+              ${CMAKE_SOURCE_DIR}/storage/innobase/win_atomics32_test.c)
+      IF (COMPILE_RES AND NOT RUN_RES)
+        MESSAGE("Adding support for Win32 atomics")
+        ADD_DEFINITIONS(-DWIN_ATOMICS32)
+      ENDIF (COMPILE_RES AND NOT RUN_RES)
+    ENDIF (CMAKE_SIZEOF_VOID_P MATCHES 8)
+  ENDIF (NOT WITHOUT_ATOMICS)
+ENDIF (WIN32)
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
                     ${CMAKE_SOURCE_DIR}/storage/innobase/include
                     ${CMAKE_SOURCE_DIR}/storage/innobase/handler

Thread
bzr commit into mysql-5.4 branch (mikael:2862) Mikael Ronstrom1 Jul