mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
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:
parent
2b83365185
commit
2f9bc02f98
@ -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}")
|
||||
|
Loading…
Reference in New Issue
Block a user