Skip to content

Commit

Permalink
build: Update copier-cpp template to v0.3.4a2
Browse files Browse the repository at this point in the history
  • Loading branch information
BurningEnlightenment committed Feb 18, 2024
1 parent c6785e8 commit ca6cb8e
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v0.3.4a1
_commit: v0.3.4a2
_src_path: gh:deeplex/copier-cpp
email: [email protected]
full_name: Henrik Steffen Gaßmann
Expand Down
23 changes: 7 additions & 16 deletions .github/workflows/cpp-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-13, ubuntu-22.04, windows-2022]
os: [ubuntu-22.04, windows-2022]
compiler: [gcc, clang, msvc]
exclude:
- os: macos-13
compiler: msvc
- os: macos-13
compiler: clang
- os: ubuntu-22.04
compiler: msvc
- os: windows-2022
compiler: gcc
include:
- os: macos-13
compiler: gcc
triplet: x64-macos
- os: macos-14
compiler: clang
triplet: arm64-macos
install: |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install llvm@16
- os: ubuntu-22.04
triplet: x64-linux
- os: ubuntu-22.04
Expand Down Expand Up @@ -80,12 +82,6 @@ jobs:
CC: ''
CXX: ''

- name: Prevent uploading a corrupted vcpkg cache
if: ${{ failure() || cancelled() }}
run: |
echo "RUNVCPKG_NO_CACHE=1" >> $GITHUB_ENV
shell: bash


check-format:
name: clang-tidy & clang-format
Expand Down Expand Up @@ -132,8 +128,3 @@ jobs:
- name: Fail if issues have been raised
if: steps.linter.outputs.checks-failed > 0
run: exit 1

- if: ${{ failure() || cancelled() }}
run: |
echo "RUNVCPKG_NO_CACHE=1" >> $GITHUB_ENV
shell: bash
45 changes: 24 additions & 21 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,13 @@
}
},
{
"name": "x64-macos",
"hidden": true,
"inherits": [ "base" ],
"name": "arm64-macos-clang",
"inherits": [
"base"
],
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-osx"
"VCPKG_TARGET_TRIPLET": "arm64-macos-clang-16-brew",
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/tools/toolchains/arm64-macos-clang-16-brew.cmake"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
Expand All @@ -167,20 +169,21 @@
}
}
},
{
"name": "x64-macos-clang",
"inherits": [ "x64-macos" ],
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-osx-clang-16-brew",
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/tools/toolchains/x64-macos-clang-16-brew.cmake"
}
},
{
"name": "x64-macos-gcc",
"inherits": [ "x64-macos" ],
"inherits": [
"base"
],
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-osx-gcc-12",
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/tools/toolchains/x64-macos-gcc-12.cmake"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"hostOS": [
"macOS"
]
}
}
}
],
Expand Down Expand Up @@ -226,13 +229,13 @@
"configuration": "RelWithDebInfo"
},
{
"name": "x64-macos-clang",
"configurePreset": "x64-macos-clang",
"name": "arm64-macos-clang",
"configurePreset": "arm64-macos-clang",
"configuration": "Debug"
},
{
"name": "x64-macos-clang-release",
"inherits": "x64-macos-clang",
"name": "arm64-macos-clang-release",
"inherits": "arm64-macos-clang",
"configuration": "RelWithDebInfo"
},
{
Expand Down Expand Up @@ -297,13 +300,13 @@
"configuration": "RelWithDebInfo"
},
{
"name": "x64-macos-clang",
"configurePreset": "x64-macos-clang",
"name": "arm64-macos-clang",
"configurePreset": "arm64-macos-clang",
"configuration": "Debug"
},
{
"name": "x64-macos-clang-release",
"inherits": "x64-macos-clang",
"name": "arm64-macos-clang-release",
"inherits": "arm64-macos-clang",
"configuration": "RelWithDebInfo"
},
{
Expand Down
14 changes: 14 additions & 0 deletions tools/toolchains/arm64-macos-clang-16-brew.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set(CMAKE_SYSTEM_PROCESSOR arm64)

execute_process(COMMAND brew --prefix llvm@16 OUTPUT_VARIABLE BREW_LLVM_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)

set(CMAKE_C_COMPILER "${BREW_LLVM_PATH}/bin/clang")
set(CMAKE_CXX_COMPILER "${BREW_LLVM_PATH}/bin/clang++")
set(CMAKE_OSX_DEPLOYMENT_TARGET 14.0 CACHE STRING "OSX deployment target")
set(CMAKE_OSX_ARCHITECTURES arm64 CACHE STRING "OSX target architectures")
set(CMAKE_OSX_SYSROOT /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk CACHE FILEPATH "The macos SDK to use")

set(CMAKE_C_STANDARD 17 CACHE STRING "C standard")
set(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ standard")

set(CMAKE_CXX_FLAGS_INIT "-fsized-deallocation")
12 changes: 0 additions & 12 deletions tools/toolchains/x64-macos-clang-16-brew.cmake

This file was deleted.

6 changes: 5 additions & 1 deletion tools/toolchains/x64-macos-gcc-12.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ set(CMAKE_SYSTEM_PROCESSOR AMD64)

set(CMAKE_C_COMPILER gcc-12)
set(CMAKE_CXX_COMPILER g++-12)
set(CMAKE_OSX_SYSROOT /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
set(CMAKE_OSX_DEPLOYMENT_TARGET 14.0 CACHE STRING "OSX deployment target")
set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING "OSX target architectures")
set(CMAKE_OSX_SYSROOT /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk CACHE FILEPATH "The macos SDK to use")
# the new linker currently segfaults with gcc (I believe this is fixed with gcc 14)
set(CMAKE_CXX_FLAGS_INIT "-Wl,-ld_classic")

set(CMAKE_C_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-macos-clang-16-brew.cmake")
set(VCPKG_OSX_ARCHITECTURES arm64)
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/arm64-macos-clang-16-brew.cmake")

if(PORT STREQUAL "status-code")
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF")
Expand Down
1 change: 1 addition & 0 deletions tools/triplets/x64-osx-gcc-12.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-macos-gcc-12.cmake")

0 comments on commit ca6cb8e

Please sign in to comment.