1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-04-25 12:01:46 +00:00

Detect byte order from preprocessor definition (#330)

Rather than having to specify or omit -DBYTESWAP in the Makefile
fragment for each system we can detect whether the system requires
byte swapping  based on the __BYTE_ORDER__ C preprocessor definition.

Update CMakeLists.txt to account for this as well.
This commit is contained in:
Nick Briggs
2021-01-31 16:56:35 -08:00
committed by GitHub
parent 70db63449c
commit 261069f131
20 changed files with 30 additions and 31 deletions

View File

@@ -65,19 +65,6 @@ IF(MAIKO_DISPLAY_X11)
)
ENDIF()
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "x86" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "i386" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
LIST(APPEND MAIKO_DEFINITIONS
"-DBYTESWAP"
)
ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
LIST(APPEND MAIKO_DEFINITIONS
"-DOS5"