Skip to content

Commit

Permalink
a way to process CMAKE_OSX_ARCHITECTURES as a list
Browse files Browse the repository at this point in the history
  • Loading branch information
Xarbirus committed Sep 5, 2024
1 parent 4db0478 commit a0bd8f0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ggml/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,11 @@ if (NOT MSVC)
endif()
endif()

list(LENGTH CMAKE_OSX_ARCHITECTURES OSX_ARCHITECTURES_LENGTH)
if (OSX_ARCHITECTURES_LENGTH GREATER 1)
message(FATAL_ERROR "There's no support for multiple architectures with CMAKE_OSX_ARCHITECTURES.\nPlease use 'lipo -create ...' to create a universal library/binary.")
endif()

set(ARCH_FLAGS "")

if (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64" OR
Expand Down

0 comments on commit a0bd8f0

Please sign in to comment.