Skip to content

Commit

Permalink
CI: Adjust presets for new M1 runner
Browse files Browse the repository at this point in the history
macos-latest now maps to macos-14, which is an M1 mac.
Adjust the aarch64 file to not enable CMake cross-compiling mode,
and add a toolchain file for x86_64 apple.
  • Loading branch information
jschwe committed Apr 25, 2024
1 parent 9d7d499 commit 6e9505c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/scripts/toolchains/aarch64-apple-darwin-clang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_C_COMPILER_TARGET "aarch64-apple-darwin")
set(CMAKE_CXX_COMPILER_TARGET "aarch64-apple-darwin")
set(CMAKE_SYSTEM_NAME "Darwin")
set(CMAKE_SYSTEM_VERSION ${CMAKE_HOST_SYSTEM_VERSION})
set(CMAKE_OSX_ARCHITECTURES "arm64" CACHE STRING "")
7 changes: 7 additions & 0 deletions .github/scripts/toolchains/x86_64-apple-darwin-clang.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_C_COMPILER_TARGET "x86_64-apple-darwin")
set(CMAKE_CXX_COMPILER_TARGET "x86_64-apple-darwin")
set(CMAKE_SYSTEM_NAME "Darwin")
set(CMAKE_SYSTEM_VERSION ${CMAKE_HOST_SYSTEM_VERSION})
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "")
3 changes: 2 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@
},
{
"name": "x86_64-apple-darwin-clang",
"inherits": ["x86_64-apple-darwin", "clang"]
"inherits": ["x86_64-apple-darwin", "clang"],
"toolchainFile": "${sourceDir}/.github/scripts/toolchains/${presetName}.cmake"
},
{
"name": "aarch64-apple-darwin-clang",
Expand Down

0 comments on commit 6e9505c

Please sign in to comment.