[CMake] Configure Mac OS X for 32-bit

Tron Thomas tron.thomas at verizon.net
Mon May 3 21:10:39 EDT 2010


The concern with building a universal binary for debug is only the time 
involved in the build.  It doesn't matter as much on a fast machine.  
However, I full rebuild on a slower machine can have some impact on 
productivity.  It would be better not to build code that is never going 
to get used.

CMake already has something that might try to implement the ability to 
configure different architectures for debug or release builds.

What is the difference between CMAKE_OSX_ARCHITECTURES and just 
OSX_ARCHITECTURES, both of which are mentioned in the CMake help 
documentation?

On 05/03/2010 09:02 AM, Sean McBride wrote:
> On Sat, 1 May 2010 23:15:03 -0700, Tron Thomas said:
>
>    
>> It looks like:
>> set (CMAKE_OSX_ARCHITECTURES "i386 ppc")
>>
>> 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?
>>      
> Forgive me if this is obvious, but: it's ok if your debug build is a
> universal binary also.  Yes it increases your build time (which granted
> could be long) but it's quite valid to have universal debug versions.
>
> Also, don't use -m32, -arch is the correct way.
>
> What you need is a way to have different values of
> CMAKE_OSX_ARCHITECTURES in Debug and Release.  If CMake doesn't support
> this, it would make a good feature request.
>
>    



More information about the CMake mailing list