# Applied on-top-of the build systems Conan profile (-pr:b / -pr:a).
# Defines no build_folder_vars, every configuration is generated at
# build/<BuildType> and one native-* preset serves Linux, Windows/MSYS2 and
# macOS alike.
#
# This profile is always the machine doing the compiling: -pr:a == host & build
# machine are the same, -pr:b=... -pr:h=... == cross-compiling (different host,
# native build).
#
#   conan install . -pr:a profiles/native -s build_type=Release --build=missing
#   cmake --workflow --preset native-release

include(default)

{% set msystem = os.getenv("MSYSTEM", "") %}
{% if msystem.startswith("CLANG") %}
{%   set compiler, version, compiler_exe = detect_api.detect_clang_compiler("clang") %}
{% elif msystem %}
{%   set compiler, version, compiler_exe = detect_api.detect_gcc_compiler("gcc") %}
{% else %}
{%   set compiler, version, compiler_exe = detect_api.detect_default_compiler() %}
{% endif %}

[settings]
compiler={{ compiler }}
compiler.version={{ detect_api.default_compiler_version(compiler, version) }}
compiler.cppstd=23
compiler.cstd=23

[conf]
tools.cmake.cmaketoolchain:generator=Ninja
tools.build:skip_test=False
