# This profile ensures that pycanha-core and its dependencies are built in Release mode (for MSVC, GCC, CLANG or others)
[settings]
{% set detected_arch = "armv8" if platform.machine().lower() in ("arm64", "aarch64") else "x86_64" %}
arch = {{ detected_arch }}
build_type = Release

{% if platform.system()=="Windows" %}
compiler = msvc
compiler.runtime_type = Release
compiler.cppstd = 23
compiler.runtime = dynamic
compiler.version = 193
os = Windows

{% elif platform.system()=="Darwin" %}
# macOS with Apple Clang
compiler = apple-clang
compiler.cppstd = 23
compiler.libcxx = libc++
compiler.version = 15.0
os = Macos

[buildenv]
CC = clang
CXX = clang++

{% else %}
# Linux gcc
compiler = gcc
compiler.cppstd = 23
compiler.libcxx = libstdc++11
compiler.version = 12
os = Linux

[buildenv]
# gcc-13 was working fine until an update to the github ubuntu runner (I think). Now it
# compiles the wheel with a too recent version of glibc, which is not compatible with
# manylinux wheels. So I'm using gcc-12 for now. To check the compatibility of the wheel
# with manylinux, you can use the auditwheel tool.
CC = gcc-12
CXX = g++-12

{% endif %}
