<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">You might try this approach:<div>Since you want to use 32-bit on MacOSX 10.6, when in debug, set the architecture only in your particular case<br><div><br></div><div><div>cmake_minimum_required(VERSION 2.4)</div><div>PROJECT(Test)</div><div>IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")</div><div> Message("${CMAKE_SYSTEM_VERSION}")</div><div> STRING (REGEX MATCH "^[^.]+" __v ${CMAKE_SYSTEM_VERSION} )</div><div> STRING (REGEX MATCH "[0-9][0-9]$" __version "00${__v}" )</div><div> STRING (COMPARE GREATER ${__version} "09" _host_is_snow_leopard_or_newer )</div><div> IF (${_host_is_snow_leopard_or_newer}) </div><div> IF (x${CMAKE_BUILD_TYPE} STREQUAL "xDebug")</div><div> SET (CMAKE_OSX_ARCHITECTURES "i386")</div><div> ENDIF (x${CMAKE_BUILD_TYPE} STREQUAL "xDebug")</div><div> ENDIF (${_host_is_snow_leopard_or_newer})</div><div>ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")</div><div><br></div><div>ADD_EXECUTABLE(HelloWorld Hello)</div><div><br></div><div>or this approach</div><div><br></div><div><div>IF (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386")</div><div> SET (CMAKE_OSX_ARCHITECTURES "i386")</div><div>ENDIF (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386")</div><div><br></div></div><div>Richard</div><div><br></div><div><div>On May 2, 2010, at 10:41 AM, Tron Thomas wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div text="#000000" bgcolor="#ffffff">
Before when I was using an earlier version of CMake, it would configure
the project to build a 32-bit version of all the project target's
regardless of which version of Mac OS X I was using. It would also
build just the platform specific version of the targets for a debug
build.<br>
<br>
Now that I have upgraded to CMake version 2.8.1, CMake wants to
configure the project's targets to build for 64-bit on Mac OS X 10.6.<br>
<br>
The only way I've found so far to make Mac OS X 10.6 build 32-bit, is
to modify the CMAKE_OSX_ARCHITECTURES to include i386. However, if I
set CMAKE_OSX_ARCHITECTURES to only i386, then it will build create an
Intel version of all targets when I build on a PowerPC system. That
means I won't be able to run and test the targets on that platform.<br>
<br>
I'm trying to get things back to where they were before I upgraded to
CMake 2.8.1. I want it to configure Xcode to build 32-bit targets,
with architecture specific version for debug builds.<br>
<br>
How can someone accomplish this?<br>
<br>
On 05/02/2010 01:58 AM, Michael Wild wrote:
<blockquote cite="mid:m2r19008901005020158oc689c033m477f07aa1cff2055@mail.gmail.com" type="cite">Well, setting CMAKE_OSX_ARCHITECTURES to i386 AND ppc is
going to get you a universal build, both of the architectures being
32-bit. So, what is it exactly that you want?<br>
<br>
Michael Wild<br>
<br>
<div class="gmail_quote">On Sun, May 2, 2010 at 8:15 AM, Tron Thomas <span dir="ltr"><<a moz-do-not-send="true" href="mailto:tron.thomas@verizon.net">tron.thomas@verizon.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">It
looks like:
<div class="im"><br>
set (CMAKE_OSX_ARCHITECTURES "i386 ppc")<br>
<br>
</div>
will build a universal binary for a debug build on any platform. How
can someone configure things so that Xcode will build a platform
specific debug version that is 32-bit?
<div class="im"><br>
<br>
<br>
On 05/01/2010 04:55 PM, Mike Jackson wrote:<br>
</div>
<div>
<div class="h5">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">You
need to set the CMAKE_OSX_ARCHITECTURES to i386. The default build<br>
on snow leopard is 64bit where as on leopard it is 32 bit.<br>
<br>
-----<br>
Mike Jackson <a moz-do-not-send="true" href="http://www.bluequartz.net/" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer <a moz-do-not-send="true" href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software Dayton, Ohio<br>
<br>
<br>
On May 1, 2010, at 15:33, Tron Thomas<<a moz-do-not-send="true" href="mailto:tron.thomas@verizon.net" target="_blank">tron.thomas@verizon.net</a>>
wrote:<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am writing a cross platform application using CMake that builds on<br>
Mac OS X. I just upgraded to CMake 2.8-1. When I configure and<br>
build my project on my Power Mac G5 system running Mac OS X 10.5.8,<br>
the project builds just fine.<br>
<br>
When I try to configure the project on my MacBook Pro running Mac OS<br>
X 10.6.3, I get link errors because the project has been configured<br>
to build 64-bit applications and some of the needed libraries and<br>
frameworks the project links with are only 32-bit.<br>
<br>
How can I configure my CMake scripts so that the project will build<br>
a 32-bit application on my MacBook Pro?<br>
<br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true" href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a moz-do-not-send="true" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a moz-do-not-send="true" href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true" href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
<br>
</blockquote>
<br>
</blockquote>
<br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true" href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a moz-do-not-send="true" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a moz-do-not-send="true" href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true" href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
</div>
_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></blockquote></div><br></div></div></body></html>