Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Michael Wild
Ahh, you want a release build to be i386 AND ppc and your debug build to be just ppc? Use different binary trees then. Simple as that. If you're not satisfied with that, put a feature request for CMAKE_OSX_ARCHITECTURES_CONFIG in the bug tracker... Michael On 2. May, 2010, at 23:39 , Tron

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Bill Hoffman
On 5/2/2010 11:41 AM, Tron Thomas wrote: 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

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Tron Thomas
What is the purpose for the OSX_ARCHITECTURE and OSX_ARCHITECTURES_CONFIG properties that already exist in CMAKE? It seems like they might be properties that are already meant to address an issue like this, only I can't figure out how they work. Also, I think previous versions of CMake did

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Bill Hoffman
On 5/3/2010 11:11 AM, Tron Thomas wrote: What is the purpose for the OSX_ARCHITECTURE and OSX_ARCHITECTURES_CONFIG properties that already exist in CMAKE? It seems like they might be properties that are already meant to address an issue like this, only I can't figure out how they work.

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Karl Merkley
On May 3, 2010, at 9:24 AM, Bill Hoffman wrote: On 5/3/2010 11:11 AM, Tron Thomas wrote: What is the purpose for the OSX_ARCHITECTURE and OSX_ARCHITECTURES_CONFIG properties that already exist in CMAKE? It seems like they might be properties that are already meant to address an issue like

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Sean McBride
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

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Sean McBride
On Mon, 3 May 2010 09:59:36 -0600, Karl Merkley said: I just read through this entire thread and I would like to expand it a little. Regardless of platform, what is the right way to determine the right build architecture? I run on a 32 bit Linux box but I use distcc which distributes the build

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Karl Merkley
On May 3, 2010, at 10:11 AM, Sean McBride wrote: On Mon, 3 May 2010 09:59:36 -0600, Karl Merkley said: I just read through this entire thread and I would like to expand it a little. Regardless of platform, what is the right way to determine the right build architecture? I run on a 32

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Sean McBride
On Mon, 3 May 2010 10:27:35 -0600, Karl Merkley said: The code currently builds and runs in 32 or 64 bit on Linux, Mac and Windows. What I would like to be able to do is to detect the build environment that the user starts cmake in and configure correctly for that environment. For example,

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Tron Thomas
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.

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Bill Hoffman
On 5/3/2010 9:10 PM, Tron Thomas wrote: 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

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-03 Thread Michael Wild
Also, take a look at ccache to speed up rebuilds. Michael On 4. May, 2010, at 3:10 , Tron Thomas wrote: 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

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-02 Thread Tron Thomas
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? On 05/01/2010 04:55 PM, Mike Jackson wrote: You need to set

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-02 Thread Michael Wild
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? Michael Wild On Sun, May 2, 2010 at 8:15 AM, Tron Thomas tron.tho...@verizon.net wrote: It looks like: set

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-02 Thread Tron Thomas
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. Now that I

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-02 Thread Richard Wackerbarth
You might try this approach: Since you want to use 32-bit on MacOSX 10.6, when in debug, set the architecture only in your particular case cmake_minimum_required(VERSION 2.4) PROJECT(Test) IF (${CMAKE_SYSTEM_NAME} MATCHES Darwin) Message(${CMAKE_SYSTEM_VERSION}) STRING (REGEX MATCH ^[^.]+

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-02 Thread Werner Smekal
Hi Thomas, On 5/2/10 5:41 PM, Tron Thomas wrote: 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

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-02 Thread Mike Jackson
I think part of the problem you are seeing is that OS X 10.6 defaults to a 64 bit build where as OS X 10.5 defaults to a 32 bit build. So in order for you to build a 32 bit binary on OS X 10.6 you need to specifically set CMAKE_OSX_ARCHITECTURES to i386 when you want to build a 32 bit i386

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-02 Thread Mike Jackson
Actually the gcc flags for OS X are: -arch i386 -arch x86_64 -arch ppc -arch ppc64 He should not have to set any environment variables but simply set the correct CMAKE_OSX_ARCHITECTURES when he uses cmake. _ Mike Jackson

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-02 Thread Tron Thomas
I don't think this will work. The first approach relies on CMAKE_BUILD_TYPE, which is only applicable to make based generators. I build my project on Mac OS X using Xcode, which is not make based, at least in this context. The second solution just reverses the problem. By this I mean

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-02 Thread Tron Thomas
Hello Werner, It is not just a simple matter of setting the architectures to either i386 or ppc. For debug, the project should create an architecture specific build. For release, the project should build an universal binary. The help documentation for CMake mentions a property call

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-02 Thread Tron Thomas
CMAKE_ BUILD_TYPE is only applicable to make based generators. As far as I know, the Xcode generator for CMake is not a make based generator. So I would not expect CMAKE_BUILD_TYPE to work in this situation. On 5-2-2010 12:43, Mike Jackson wrote: I think part of the problem you are seeing

[CMake] Configure Mac OS X for 32-bit

2010-05-01 Thread Tron Thomas
I am writing a cross platform application using CMake that builds on Mac OS X. I just upgraded to CMake 2.8-1. When I configure and build my project on my Power Mac G5 system running Mac OS X 10.5.8, the project builds just fine. When I try to configure the project on my MacBook Pro running

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-01 Thread Mike Jackson
You need to set the CMAKE_OSX_ARCHITECTURES to i386. The default build on snow leopard is 64bit where as on leopard it is 32 bit. - Mike Jackson www.bluequartz.net Principal Software Engineer mike.jack...@bluequartz.net BlueQuartz Software Dayton, Ohio

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-01 Thread Tron Thomas
I don't want to set the value to architecture set to i386 when I'm building on a PowerPC system. I also only want a single architecture for a debug build and universal binary for release builds. So, I tried doing this in a section of the CMake script that already determined it was building

Re: [CMake] Configure Mac OS X for 32-bit

2010-05-01 Thread Tron Thomas
Okay, I think I figured it out. I used this: set(CMAKE_OSX_ARCHITECTURES i386 ppc) At least on my MacBook Pro that sets the architecture to i386 for debug builds. I'll have to try it on the PowerMac to make sure its architecture gets set to ppc for debug builds. On 05/01/2010 04:55 PM,