Sean McBride wrote:
Remember that using TRY_COMPILE/TRY_RUN or any method that runs code on
the build machine breaks cross-compilation.
(...)
Since a compiler knows what CPU it is compiling for (by definition), I
think a better solution, in general, is to query the compiler.
See Boost's detail/endian.hpp for a rather complete endianess detection
at compile time. Note that some CPUs are switchable between and Little
and Big Endian, so one has to look at the combination of the (target) OS
and CPU to determine endianess:
http://boost.cvs.sourceforge.net/boost/boost/boost/detail/endian.hpp
Regards,
Stephan
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake