On 9/11/06, Brandon J. Van Every <[EMAIL PROTECTED]> wrote:

Hrm.  I wanted to say that CMake should treat a Universal binary as
multiple targets.  But if gcc treats them as a single target, that's not
possible.  Sticky wicket.  Suppress Endian checks on MacOS X?

Basically.  Although you'll still need to check __BIG_ENDIAN__ on OSX;
so somewhere the code needs to know at preprocessor-time.

It's ugly, but this is what we used for dbus's (ew, autoconf) check:

---(snip!)---
## byte order
case $host_os in
       darwin*)
               # check at compile-time, so that it is possible to
build universal
               # (with multiple architectures at once on the compile line)
               AH_VERBATIM([WORDS_BIGENDIAN_DARWIN], [
                       /* Use the compiler-provided endianness
defines to allow universal compiling. */
                       #if defined(__BIG_ENDIAN__)
                       #define WORDS_BIGENDIAN 1
                       #endif
               ])
               ;;
       *)
               AC_C_BIGENDIAN
               ;;
esac
---(snip!)---

That goes right into config.h.
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to