Skip to content

Commit ebdaa28

Browse files
authored
profile undefine settings (#4285)
1 parent c5441e2 commit ebdaa28

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

reference/config_files/profiles.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,22 @@ define the ``compiler.runtime_type`` for ``msvc``, so doing something like ``myd
908908
doesn't automatically define ``mydep/*:compiler.runtime_type``.
909909

910910

911+
In some circumstances it might be desired to undefine some specific package settings, assuming that such a setting
912+
allows to be undefined. For this case, the syntax ``~`` can be used as:
913+
914+
.. code-block:: text
915+
:caption: myprofile
916+
917+
[settings]
918+
build_type=Release
919+
mypkg/*:build_type=~
920+
921+
922+
This syntax will define ``build_type=Release`` for all packages, except for ``mypkg`` (any version), that will leave
923+
``build_type`` undefined, as it was never assigned a value. In recipe code that means that ``self.settings.build_type``
924+
will be ``None``.
925+
926+
911927
Profile includes
912928
----------------
913929

0 commit comments

Comments
 (0)