-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
What is your suggestion?
Hi,
I was looking to profile-rendering using jinja templates to use single profile with settings-specific options.
Getting settings from a filename using profile_name is almost what I was looking for.
Limitation with profile_name I found is, that it's "current profile filename". So it's usage i more about to copy&paste profile under different name to use it for different settings.
I think that having also root_profile_name variable with name of "root" profile (used from cli --profile) will add more efficient setup.
Here is example I would like to use:
Lest say package
foohas optional dependency on packagebarusingwith_baroption. Butbardoesn't support arm architecture
Profiles
.my_options
{% set os, arch, compiler, compiler_version = root_profile_name.split('-') %}
[options]
foo/*:with_bar = {{ arch in ['x86', 'x86_64'] }}Linux-x86_64-gcc-12
include(.my_options)Linux-armv8-gcc-12
include(.my_options)Usage
... --profile:host Linux-armv8-gcc-12
... --profile:host Linux-x86_64-gcc-12
This way, I could maintain single .my_options profile, as settings-specific options are rare but required.
Have you read the CONTRIBUTING guide?
- I've read the CONTRIBUTING guide