Rename 'variant_name' to 'variant' and document it in autotools build system (#26064)

This commit is contained in:
Harmen Stoppels
2021-09-21 11:27:41 +02:00
committed by GitHub
parent 45ba4d94bd
commit 58663692a4
3 changed files with 40 additions and 20 deletions

View File

@@ -324,8 +324,29 @@ options:
--with-libfabric=</path/to/libfabric>
"""""""""""""""""""""""
The ``variant`` keyword
"""""""""""""""""""""""
When Spack variants and configure flags do not correspond one-to-one, the
``variant`` keyword can be passed to ``with_or_without`` and
``enable_or_disable``. For example:
.. code-block:: python
variant('debug_tools', default=False)
config_args += self.enable_or_disable('debug-tools', variant='debug_tools')
Or when one variant controls multiple flags:
.. code-block:: python
variant('debug_tools', default=False)
config_args += self.with_or_without('memchecker', variant='debug_tools')
config_args += self.with_or_without('profiler', variant='debug_tools')
""""""""""""""""""""
activation overrides
Activation overrides
""""""""""""""""""""
Finally, the behavior of either ``with_or_without`` or