Additional macOS configuration with llvm@18

This commit is contained in:
Dan Paulat 2025-06-14 01:07:03 -05:00
parent ac4521483d
commit 337406971a
6 changed files with 197 additions and 13 deletions

View file

@ -0,0 +1,8 @@
[settings]
arch=x86_64
build_type=Release
compiler=clang
compiler.cppstd=20
compiler.libcxx=libc++
compiler.version=18
os=Macos

View file

@ -0,0 +1,8 @@
[settings]
arch=armv8
build_type=Release
compiler=clang
compiler.cppstd=20
compiler.libcxx=libc++
compiler.version=18
os=Macos

View file

@ -45,20 +45,29 @@ python3 -m pip install ${PIP_FLAGS} -r "${script_dir}/../requirements.txt"
conan profile detect -e
# Conan profiles
conan_profiles=(
"scwx-linux_clang-17"
"scwx-linux_clang-17_armv8"
"scwx-linux_clang-18"
"scwx-linux_clang-18_armv8"
"scwx-linux_gcc-11"
"scwx-linux_gcc-11_armv8"
"scwx-linux_gcc-12"
"scwx-linux_gcc-12_armv8"
"scwx-linux_gcc-13"
"scwx-linux_gcc-13_armv8"
"scwx-linux_gcc-14"
"scwx-linux_gcc-14_armv8"
if [[ "$(uname)" == "Darwin" ]]; then
# macOS profiles
conan_profiles=(
"scwx-macos_clang-18"
"scwx-macos_clang-18_armv8"
)
else
# Linux profiles
conan_profiles=(
"scwx-linux_clang-17"
"scwx-linux_clang-17_armv8"
"scwx-linux_clang-18"
"scwx-linux_clang-18_armv8"
"scwx-linux_gcc-11"
"scwx-linux_gcc-11_armv8"
"scwx-linux_gcc-12"
"scwx-linux_gcc-12_armv8"
"scwx-linux_gcc-13"
"scwx-linux_gcc-13_armv8"
"scwx-linux_gcc-14"
"scwx-linux_gcc-14_armv8"
)
fi
# Install Conan profiles
for profile_name in "${conan_profiles[@]}"; do

30
tools/setup-macos-debug.sh Executable file
View file

@ -0,0 +1,30 @@
#!/bin/bash
script_source="${BASH_SOURCE[0]:-$0}"
script_dir="$(cd "$(dirname "${script_source}")" && pwd)"
export build_dir="$(python3 -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "${1:-${script_dir}/../build-debug}")"
export build_type=Debug
export conan_profile=${2:-scwx-macos_clang-18_armv8}
export generator=Ninja
export qt_base="/Users/${USER}/Qt"
export qt_arch=macos
export address_sanitizer=${4:-disabled}
# Set explicit compiler paths
export CC=/opt/homebrew/opt/llvm@18/bin/clang
export CXX=/opt/homebrew/opt/llvm@18/bin/clang++
export PATH="/opt/homebrew/opt/llvm@18/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/llvm@18/lib -L/opt/homebrew/opt/llvm@18/lib/c++"
export CPPFLAGS="-I/opt/homebrew/opt/llvm@18/include"
# Assign user-specified Python Virtual Environment
if [ "${3:-}" = "none" ]; then
unset venv_path
else
# macOS does not have 'readlink -f', use python for realpath
export venv_path="$(python3 -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "${3:-${script_dir}/../.venv}")"
fi
# Perform common setup
"${script_dir}/lib/setup-common.sh"

30
tools/setup-macos-release.sh Executable file
View file

@ -0,0 +1,30 @@
#!/bin/bash
script_source="${BASH_SOURCE[0]:-$0}"
script_dir="$(cd "$(dirname "${script_source}")" && pwd)"
export build_dir="$(python3 -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "${1:-${script_dir}/../build-release}")"
export build_type=Release
export conan_profile=${2:-scwx-macos_clang-18_armv8}
export generator=Ninja
export qt_base="/Users/${USER}/Qt"
export qt_arch=macos
export address_sanitizer=${4:-disabled}
# Set explicit compiler paths
export CC=/opt/homebrew/opt/llvm@18/bin/clang
export CXX=/opt/homebrew/opt/llvm@18/bin/clang++
export PATH="/opt/homebrew/opt/llvm@18/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/llvm@18/lib -L/opt/homebrew/opt/llvm@18/lib/c++"
export CPPFLAGS="-I/opt/homebrew/opt/llvm@18/include"
# Assign user-specified Python Virtual Environment
if [ "${3:-}" = "none" ]; then
unset venv_path
else
# macOS does not have 'readlink -f', use python for realpath
export venv_path="$(python3 -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "${3:-${script_dir}/../.venv}")"
fi
# Perform common setup
"${script_dir}/lib/setup-common.sh"