diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-03-24 14:15:05 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-03-24 14:15:05 (GMT) |
commit | f7c1723135f140eaac1ee02c31c0339761778f22 (patch) | |
tree | ae4858167f38f2e57c3dcf442fbfe83aeea1cc82 /Tests/ExternalOBJ | |
parent | cec6543d0d7e0f8302b092f3ff66fb240bc212c4 (diff) | |
download | CMake-f7c1723135f140eaac1ee02c31c0339761778f22.zip CMake-f7c1723135f140eaac1ee02c31c0339761778f22.tar.gz CMake-f7c1723135f140eaac1ee02c31c0339761778f22.tar.bz2 |
ENH: add support for universal binaries
Diffstat (limited to 'Tests/ExternalOBJ')
-rw-r--r-- | Tests/ExternalOBJ/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/ExternalOBJ/Object/CMakeLists.txt | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/Tests/ExternalOBJ/CMakeLists.txt b/Tests/ExternalOBJ/CMakeLists.txt index cf95dc5..e5c5657 100644 --- a/Tests/ExternalOBJ/CMakeLists.txt +++ b/Tests/ExternalOBJ/CMakeLists.txt @@ -1,5 +1,15 @@ PROJECT (ExternalOBJ) +IF(APPLE) + # set _CMAKE_OSX_MACHINE to umame -m + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE _CMAKE_OSX_MACHINE) + # check for Power PC and change to ppc + IF("${_CMAKE_OSX_MACHINE}" MATCHES "Power") + SET(_CMAKE_OSX_MACHINE ppc) + ENDIF("${_CMAKE_OSX_MACHINE}" MATCHES "Power") + SET(CMAKE_OSX_ARCHITECTURES ${_CMAKE_OSX_MACHINE}) +ENDIF(APPLE) + # Build the external object file. TRY_COMPILE(EXTERNAL_OBJECT_BUILT ${ExternalOBJ_BINARY_DIR}/Object diff --git a/Tests/ExternalOBJ/Object/CMakeLists.txt b/Tests/ExternalOBJ/Object/CMakeLists.txt index 141af79..7c01e54 100644 --- a/Tests/ExternalOBJ/Object/CMakeLists.txt +++ b/Tests/ExternalOBJ/Object/CMakeLists.txt @@ -1,3 +1,12 @@ PROJECT(Object) +IF(APPLE) + # set _CMAKE_OSX_MACHINE to umame -m + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE _CMAKE_OSX_MACHINE) + # check for Power PC and change to ppc + IF("${_CMAKE_OSX_MACHINE}" MATCHES "Power") + SET(_CMAKE_OSX_MACHINE ppc) + ENDIF("${_CMAKE_OSX_MACHINE}" MATCHES "Power") + SET(CMAKE_OSX_ARCHITECTURES ${_CMAKE_OSX_MACHINE}) +ENDIF(APPLE) ADD_EXECUTABLE(external external_object.cxx external_main.cxx) |