summaryrefslogtreecommitdiff
path: root/lib/spack/docs
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2021-09-21 11:27:41 +0200
committerGitHub <noreply@github.com>2021-09-21 11:27:41 +0200
commit58663692a47cb091737223f59651208d819605e3 (patch)
tree3c46553b282e000d0dcdfb4d3ccfd00d6cfb8c4b /lib/spack/docs
parent45ba4d94bd35b665b3655a471dd365e91756b511 (diff)
downloadspack-58663692a47cb091737223f59651208d819605e3.tar.gz
spack-58663692a47cb091737223f59651208d819605e3.tar.bz2
spack-58663692a47cb091737223f59651208d819605e3.tar.xz
spack-58663692a47cb091737223f59651208d819605e3.zip
Rename 'variant_name' to 'variant' and document it in autotools build system (#26064)
Diffstat (limited to 'lib/spack/docs')
-rw-r--r--lib/spack/docs/build_systems/autotoolspackage.rst23
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/spack/docs/build_systems/autotoolspackage.rst b/lib/spack/docs/build_systems/autotoolspackage.rst
index 479a11b00d..558c56da0f 100644
--- a/lib/spack/docs/build_systems/autotoolspackage.rst
+++ b/lib/spack/docs/build_systems/autotoolspackage.rst
@@ -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