TestBigEndian.cmake 502 B

12345678910111213141516
  1. #
  2. # Check if the system is big endian or little endian
  3. #
  4. # VARIABLE - variable to store the result to
  5. #
  6. MACRO(TEST_BIG_ENDIAN VARIABLE)
  7. TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
  8. ${CMAKE_BINARY_DIR}
  9. ${CMAKE_ROOT}/Modules/TestBigEndian.c
  10. OUTPUT_VARIABLE OUTPUT)
  11. IF(NOT HAVE_${VARIABLE})
  12. FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
  13. "Determining the endianes of the system failed with the following output:\n${OUTPUT}\n\n")
  14. ENDIF(NOT HAVE_${VARIABLE})
  15. ENDMACRO(TEST_BIG_ENDIAN)