Skip to content

Commit

Permalink
Only build universal binaries in CI for releases
Browse files Browse the repository at this point in the history
This will reduce build time during development.
  • Loading branch information
JoseDiazRohena committed Jul 16, 2023
1 parent 95c96ac commit f7a6f81
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ project(${PROJECT_NAME} VERSION ${CURRENT_VERSION})
# By default we don't want Xcode schemes to be made for modules, etc
set(CMAKE_XCODE_GENERATE_SCHEME OFF)


# Building universal binaries on macOS increases build time
# This is set on CI but not during local dev
if ((DEFINED ENV{CI}) AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
message("Building for Apple Silicon and x86_64")
set(CMAKE_OSX_ARCHITECTURES arm64 x86_64)
endif ()

# Enable to build universal binaries on macOS, increasing build time
# This only affects local builds, GitHub actions always builds Universals
# set(CMAKE_OSX_ARCHITECTURES arm64 x86_64)
Expand Down

0 comments on commit f7a6f81

Please sign in to comment.