Skip to content

Commit

Permalink
Adding compiler options for building fat binaries on MacOS.
Browse files Browse the repository at this point in the history
Originally they were written in `configure.ac` for `darwin9`.
Unfortunately, this doesn't work on Github workers:
- clang: error: no such file or directory: 'ppc'
- clang: error: no such file or directory: 'x86_64'

Maybe that's because the target on macos-runner is `x86_64-apple-darwin21.6.0`.
  • Loading branch information
LostInKadath committed Nov 26, 2023
1 parent 5c97210 commit 73cfe91
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ target_compile_options(compile_options INTERFACE -Wall -pedantic $<IF:$<CONFIG:D
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(compile_options INTERFACE -Wextra -Wshadow -Wwrite-strings -Wno-unused -g)
endif()
if(APPLE)
# Compiler flags for creating universal (fat) binaries.
#target_compile_options(compile_options INTERFACE -force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc -arch x86_64)
endif()

# Library sources
set(SOURCES
Expand Down

0 comments on commit 73cfe91

Please sign in to comment.