Document cli syntax for environment scopes (#20344)
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
parent
df8dcef963
commit
f4b56620e5
@ -78,6 +78,13 @@ are six configuration scopes. From lowest to highest:
|
|||||||
If multiple scopes are listed on the command line, they are ordered
|
If multiple scopes are listed on the command line, they are ordered
|
||||||
from lowest to highest precedence.
|
from lowest to highest precedence.
|
||||||
|
|
||||||
|
#. **environment**: When using Spack :ref:`environments`, Spack reads
|
||||||
|
additional configuration from the environment file. See
|
||||||
|
:ref:`environment-configuration` for further details on these
|
||||||
|
scopes. Environment scopes can be referenced from the command line
|
||||||
|
as ``env:name`` (to reference environment ``foo``, use
|
||||||
|
``env:foo``).
|
||||||
|
|
||||||
#. **command line**: Build settings specified on the command line take
|
#. **command line**: Build settings specified on the command line take
|
||||||
precedence over all other scopes.
|
precedence over all other scopes.
|
||||||
|
|
||||||
@ -192,10 +199,11 @@ with MPICH. You can create different configuration scopes for use with
|
|||||||
Platform-specific Scopes
|
Platform-specific Scopes
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
For each scope above, there can also be platform-specific settings.
|
For each scope above (excluding environment scopes), there can also be
|
||||||
For example, on most platforms, GCC is the preferred compiler.
|
platform-specific settings. For example, on most platforms, GCC is
|
||||||
However, on macOS (darwin), Clang often works for more packages,
|
the preferred compiler. However, on macOS (darwin), Clang often works
|
||||||
and is set as the default compiler. This configuration is set in
|
for more packages, and is set as the default compiler. This
|
||||||
|
configuration is set in
|
||||||
``$(prefix)/etc/spack/defaults/darwin/packages.yaml``. It will take
|
``$(prefix)/etc/spack/defaults/darwin/packages.yaml``. It will take
|
||||||
precedence over settings in the ``defaults`` scope, but can still be
|
precedence over settings in the ``defaults`` scope, but can still be
|
||||||
overridden by settings in ``system``, ``system/darwin``, ``site``,
|
overridden by settings in ``system``, ``system/darwin``, ``site``,
|
||||||
|
@ -399,6 +399,12 @@ There are two ways to include configuration information in a Spack Environment:
|
|||||||
|
|
||||||
#. Included in the ``spack.yaml`` file from another file.
|
#. Included in the ``spack.yaml`` file from another file.
|
||||||
|
|
||||||
|
Many Spack commands also affect configuration information in files
|
||||||
|
automatically. Those commands take a ``--scope`` argument, and the
|
||||||
|
environment can be specified by ``env:NAME`` (to affect environment
|
||||||
|
``foo``, set ``--scope env:foo``). These commands will automatically
|
||||||
|
manipulate configuration inline in the ``spack.yaml`` file.
|
||||||
|
|
||||||
"""""""""""""""""""""
|
"""""""""""""""""""""
|
||||||
Inline configurations
|
Inline configurations
|
||||||
"""""""""""""""""""""
|
"""""""""""""""""""""
|
||||||
|
Loading…
Reference in New Issue
Block a user