[CMake] What's the 'Modern' way to determine machine endianness?

Chris Scharver scharver at evl.uic.edu
Fri Jun 10 19:17:41 EDT 2005


On Jun 10, 2005, at 4:45 PM, Kent Williams wrote:

> Now that works just fine but it begs the question: Anything labeled  
> 'BackwardsCompatibility' is a priori deprecated, but I don't know  
> of any way to detect endian-ness in CMake that doesn't depend on  
> the CMakeBackwardCompatibility*.cmake files.

Just use TEST_BIG_ENDIAN() from ${CMAKE_ROOT}/Modules/ 
TestBigEndian.cmake. It seems to work like a charm for me!

-- 
Chris Scharver
Electronic Visualization Laboratory
The University of Illinois at Chicago



More information about the CMake mailing list