File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -626,6 +626,24 @@ Some of the capabilities of the profile templates are:
626626 [settings]
627627 compiler.version={{ version }}
628628
629+ - Branching based on the context that the profile is being rendered for.
630+ The ``context `` variable is injected and can take the values ``host ``, ``build `` or be ``None ``.
631+ For example, you can define different settings for the host and build contexts
632+ without having to create two different profiles:
633+
634+ .. code-block :: jinja
635+ :caption: *profile_vars*
636+
637+ [settings]
638+ os=Linux
639+ compiler=gcc
640+ compiler.version=12
641+ {% if context == "host" %}
642+ compiler.cppstd=gnu17
643+ {% else %}
644+ compiler.cppstd=gnu20
645+ {% endif %}
646+
629647 - Including or importing other files from ``profiles `` folder:
630648
631649 .. code-block :: jinja
You can’t perform that action at this time.
0 commit comments