[CMake] OS X architecture changes interfere with CheckTypeSize()?
Clinton Stimpson
clinton at elemtech.com
Wed Aug 11 16:23:43 EDT 2010
On Wednesday, August 11, 2010 02:13:09 pm Michael Jackson wrote:
> H
> ___________________________________________________________
> Mike Jackson www.bluequartz.net
> Principal Software Engineer mike.jackson at bluequartz.net
> BlueQuartz Software Dayton, Ohio
>
> On Aug 11, 2010, at 4:00 PM, Olaf van der Spek wrote:
> > On Wed, Aug 11, 2010 at 9:52 PM, Michael Wild <themiwi at gmail.com>
> >
> > wrote:
> >> The problem is more fundamental. If you set CMAKE_OSX_ARCHITECTURES
> >> to e.g. i386;x86_64;ppc;ppc64 to compile a four-way universal
> >> binary, what is the expected result from CheckTypeSize() and
> >> similar functions? There should be one result for each of the
> >> architectures. That's why you need to do it at compile-time using
> >> __i386__, __x86_64__, __ppc__ and __ppc64__, or you test the length
> >> of the CMAKE_OSX_ARCHITECTURES list and if that is larger than one,
> >> you error out. IMHO CMake can't help you much beyond that.
> >
> > Didn't we have this discussion for Windows as well?
> > Seems like a fundamental problem.
> >
> > Olaf
>
> No we didn't. And no, it is not the same problem. Windows compiles a
> single architecture at a time.
>
He may be referring to a previous discussion was about one visual studio
project to generate both 32 and 64 bit code. In that case you have one CMake
cache for multiple output architectures, just like you do on Mac.
But there also an extra problem of how find_library() should behave in this
case, since Windows doesn't support multi-arch binaries. You can't link the
one library in your CMake cache into both 32 and 64 bit binaries.
Clint
More information about the CMake
mailing list