Skip to content

Commit

Permalink
build: added cpu byte order detection (same as msgpack-c)
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich committed Aug 21, 2024
1 parent 4ac5b7b commit 76941a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ elseif(FLB_SYSTEM_FREEBSD)
set(WAMR_DISABLE_STACK_HW_BOUND_CHECK 1)
endif()

INCLUDE(TestBigEndian)
include(GNUInstallDirs)
include(ExternalProject)
include(cmake/FindJournald.cmake)
Expand Down Expand Up @@ -772,6 +773,15 @@ if(FLB_HAVE_UNIX_SOCKET)
FLB_DEFINITION(FLB_HAVE_UNIX_SOCKET)
endif()

# byte order detection
test_big_endian(BIG_ENDIAN_SYSTEM_DETECTED)

if (BIG_ENDIAN_SYSTEM_DETECTED)
FLB_DEFINITION(FLB_HAVE_BIG_ENDIAN_SYSTEM)
else()
FLB_DEFINITION(FLB_HAVE_LITTLE_ENDIAN_SYSTEM)
endif ()

# Configuration file YAML format support
if(FLB_CONFIG_YAML)
find_package(PkgConfig)
Expand Down

0 comments on commit 76941a3

Please sign in to comment.