Skip to content

Commit 1de3d1a

Browse files
committed
cmake : define GGML_BIG_ENDIAN for big-endian targets
1 parent 77e6caa commit 1de3d1a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ set_target_properties(whisper PROPERTIES
9494
target_include_directories(whisper PUBLIC . ../include)
9595
target_compile_features (whisper PUBLIC cxx_std_11) # don't bump
9696

97+
if (CMAKE_CXX_BYTE_ORDER STREQUAL "BIG_ENDIAN")
98+
set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -DGGML_BIG_ENDIAN)
99+
endif()
100+
97101
if (WHISPER_EXTRA_FLAGS)
98102
target_compile_options(whisper PRIVATE ${WHISPER_EXTRA_FLAGS})
99103
endif()

0 commit comments

Comments
 (0)