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 to some 64 bit machines. I always just >edit the CMakeCache.txt manually and add the -m32 flag. Some of my >customers don't like that approach and would like to automate the >decision for Mac, Linux and Windows. So I need to determine is that >platform that cmake runs on 32 bit or 64 bit and then set the correct >flags for each platform.
For Mac anyway, the 32/64 'bitness' of the building machine is irrelevant. PPC Macs can build Intel code, 32 bit Macs can build 64 bit code, and vice versa, and etc. Your code needs to be written such that it 1) supports both endiannesses 2) understands both 32 and 64 bit pointers 3) doesn't make invalid assumptions about the size of int, long, void*, etc. Only if your code is properly written can it be built as either 32 or 64 bit. Then I guess the person doing the building also has to decide which kinds of machines he's building for. -- ____________________________________________________________ Sean McBride, B. Eng s...@rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake