summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-11-08 19:31:56 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-11-08 19:31:56 (GMT)
commit2f23d79969499a718d865837e5b5b9b33ee9d74a (patch)
tree861964718dbc35631d881d7769816d3ed4cdb3ef
parent43c8923f149f254b84d1a18f92e07962a0119fe7 (diff)
downloadCMake-2f23d79969499a718d865837e5b5b9b33ee9d74a.zip
CMake-2f23d79969499a718d865837e5b5b9b33ee9d74a.tar.gz
CMake-2f23d79969499a718d865837e5b5b9b33ee9d74a.tar.bz2
ENH: fix bug in default arch, it was using the environment variable which is not a default
-rw-r--r--Modules/Platform/Darwin.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 2260ebf..f9d3515 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -63,6 +63,9 @@ IF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
IF("${_CMAKE_OSX_MACHINE}" MATCHES "Power")
SET(_CMAKE_OSX_MACHINE ppc)
ENDIF("${_CMAKE_OSX_MACHINE}" MATCHES "Power")
+ # set the default based on uname and not the environment variable
+ # as that is what is used to change it!
+ SET(CMAKE_OSX_ARCHITECTURES_DEFAULT ${_CMAKE_OSX_MACHINE})
# check for environment variable CMAKE_OSX_ARCHITECTURES
# if it is set.
IF(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
@@ -71,7 +74,6 @@ IF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
# now put _CMAKE_OSX_MACHINE into the cache
SET(CMAKE_OSX_ARCHITECTURES ${_CMAKE_OSX_MACHINE}
CACHE STRING "Build architectures for OSX")
- SET(CMAKE_OSX_ARCHITECTURES_DEFAULT ${_CMAKE_OSX_MACHINE})
ENDIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)