summaryrefslogtreecommitdiff
path: root/cmake/package_name.cmake
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2013-03-01 13:25:59 +0100
committerTor Didriksen <tor.didriksen@oracle.com>2013-03-01 13:25:59 +0100
commite478ceaa3f58ad4178144fa10ebbf35c50ba23c7 (patch)
tree34f72eaf0e322b86ab08ed89e1a40bececa3fca8 /cmake/package_name.cmake
parentb29fb8c459a5770ffb027e702c5fbc935190ba93 (diff)
downloadmariadb-git-e478ceaa3f58ad4178144fa10ebbf35c50ba23c7.tar.gz
Bug#11765489 CMAKE BUILD ON MAC OS X DOES NOT DETERMINE CPU TYPE
Don't use CMAKE_OSX_ARCHITECTURES to determine DEFAULT_MACHINE if it is not defined. If we're 64bit, then use "x86_64" rather than "x86"
Diffstat (limited to 'cmake/package_name.cmake')
-rw-r--r--cmake/package_name.cmake18
1 files changed, 13 insertions, 5 deletions
diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake
index 28f89895f2d..1566117cb60 100644
--- a/cmake/package_name.cmake
+++ b/cmake/package_name.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2013, 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
@@ -83,12 +83,20 @@ IF(NOT VERSION)
MATH(EXPR VER "${VER} -4")
SET(DEFAULT_PLATFORM "osx10.${VER}")
ENDIF()
- LIST(LENGTH CMAKE_OSX_ARCHITECTURES LEN)
- IF(LEN GREATER 1)
- SET(DEFAULT_MACHINE "universal")
+
+ IF(CMAKE_OSX_ARCHITECTURES)
+ LIST(LENGTH CMAKE_OSX_ARCHITECTURES LEN)
+ IF(LEN GREATER 1)
+ SET(DEFAULT_MACHINE "universal")
+ ELSE()
+ SET(DEFAULT_MACHINE "${CMAKE_OSX_ARCHITECTURES}")
+ ENDIF()
ELSE()
- SET(DEFAULT_MACHINE "${CMAKE_OSX_ARCHITECTURES}")
+ IF(64BIT)
+ SET(DEFAULT_MACHINE "x86_64")
+ ENDIF()
ENDIF()
+
IF(DEFAULT_MACHINE MATCHES "i386")
SET(DEFAULT_MACHINE "x86")
ENDIF()