Skip to content

Commit

Permalink
[ci] Try more osx fixes...
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Apr 10, 2024
1 parent 7e5c676 commit ab04f14
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
16 changes: 13 additions & 3 deletions .cninja/macos-release-11.0.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,22 @@ execute_process(
)
set_cache(CMAKE_OSX_SYSROOT "${XCODE_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk")

if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(IS_ARM64 0)
elseif(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
set(IS_ARM64 1)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
set(IS_ARM64 0)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "arm*")
set(IS_ARM64 1)
endif()

if(IS_ARM64)
set_cache(KFR_ARCH neon)
else()
string(APPEND CMAKE_C_FLAGS_INIT " -march=ivybridge -mtune=cannonlake ")
string(APPEND CMAKE_CXX_FLAGS_INIT " -march=ivybridge -mtune=cannonlake ")
set_cache(KFR_ARCH sse2)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "arm*")
set_cache(KFR_ARCH neon)
endif()

set_cache(BUILD_SHARED_LIBS OFF)
Expand Down
5 changes: 4 additions & 1 deletion ci/osx-package.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,17 @@ fi

if [[ "$MACOS_ARCH" = "x86_64" ]]; then
export CNINJA_TOOLCHAIN=macos-release-10.15
export CMAKE_OSX_ARCH=x86_64
else
export CNINJA_TOOLCHAIN=macos-release-11.0
export CMAKE_OSX_ARCH=arm64
fi

xcrun /usr/local/bin/cninja -S "$PWD" -B build "$CNINJA_TOOLCHAIN" -- \
-DOSSIA_SDK="$OSSIA_SDK" \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCMAKE_UNITY_BUILD=1
-DCMAKE_UNITY_BUILD=1 \
-DCMAKE_OSX_ARCHITECTURES="$CMAKE_OSX_ARCH"

find . -type f -name 'ossia score' \
| grep '.' \
Expand Down

0 comments on commit ab04f14

Please sign in to comment.