From 35cc06827572a366b53222e659e23c4a2c107ffe Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 21 Mar 2020 00:31:41 +0100 Subject: [PATCH] CmakeLists.txt: define WORDS_BIGENDIAN when the CPU is big endian fixes #184 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbc74bbe..ab3c1c89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -402,6 +402,9 @@ endif() # CPU endianness include(TestBigEndian) test_big_endian(HOST_BIG_ENDIAN) +if(HOST_BIG_ENDIAN) + add_definitions(-DWORDS_BIGENDIAN) +endif() # IEEE floating point set(HAVE_IEEEFP 1)