[CMake] Testing the size of long throws error when more than one OS X Arch is passed

Hendrik Sattler post at hendrik-sattler.de
Wed Nov 18 02:58:28 EST 2009


Zitat von Michael Jackson <mike.jackson at bluequartz.net>:
> Then in the header file that gets configured I have this:
>
> #if !defined(__APPLE__)
> # define MXA_SIZEOF_CHAR   @MXA_SIZEOF_CHAR@
> # define MXA_SIZEOF_SHORT  @MXA_SIZEOF_SHORT@
> # define MXA_SIZEOF_INT    @MXA_SIZEOF_INT@
> # define MXA_SIZEOF_LONG   @MXA_SIZEOF_LONG@
> # define MXA_SIZEOF_FLOAT  @MXA_SIZEOF_FLOAT@
> # define MXA_SIZEOF_DOUBLE @MXA_SIZEOF_DOUBLE@
> #else
> # define MXA_SIZEOF_CHAR   1
> # define MXA_SIZEOF_SHORT  2
> # define MXA_SIZEOF_INT    4
> # if defined(__LP64__) && __LP64__
> #  define MXA_SIZEOF_LONG  8
> # else
> #  define MXA_SIZEOF_LONG  4
> # endif
> # define MXA_SIZEOF_FLOAT  4
> # define MXA_SIZEOF_DOUBLE 8
> #endif
>
> I think why it never gets hit is that everyone just builds CMake for a
> single arch, or they let CMake do the initial run, and then use the
> CMake-GUI to add an arch to the list. Just a guess. I guess someone can
> file a bug against cmake for that..

Why do you need those CHECK_TYPE_SIZE() and this defines above at all?
Maybe this problem is self-made?

HS




More information about the CMake mailing list