Added a check for endianness in CMake, the lack of which and fix for was contributed by Wei-Keng Liao

This commit is contained in:
Ward Fisher 2017-02-06 12:23:55 -07:00
parent 2b83365185
commit 2f9bc02f98

View File

@ -101,6 +101,12 @@ INCLUDE(${CMAKE_ROOT}/Modules/GetPrerequisites.cmake)
INCLUDE(CheckCCompilerFlag)
FIND_PACKAGE(PkgConfig QUIET)
# A check to see if the system is big endian
TEST_BIG_ENDIAN(BIGENDIAN)
IF(${BIGENDIAN})
SET(WORDS_BIGENDIAN "1")
ENDIF(${BIGENDIAN})
# A macro to check if a C linker supports a particular flag.
MACRO(CHECK_C_LINKER_FLAG M_FLAG M_RESULT)
SET(T_REQ_FLAG "${CMAKE_REQUIRED_FLAGS}")