summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark W. Krentel <krentel@rice.edu>2019-06-05 14:57:47 -0500
committerPeter Scheibel <scheibel1@llnl.gov>2019-06-28 11:59:10 -0700
commit8aa8b50f915661fdb6f125c189f0dbd2db298550 (patch)
treeb539b0138c8cf2b7c8d008581050f125633c8992 /lib
parent5873beb83f669ee61022e352498cfeaf427ce56d (diff)
downloadspack-8aa8b50f915661fdb6f125c189f0dbd2db298550.tar.gz
spack-8aa8b50f915661fdb6f125c189f0dbd2db298550.tar.bz2
spack-8aa8b50f915661fdb6f125c189f0dbd2db298550.tar.xz
spack-8aa8b50f915661fdb6f125c189f0dbd2db298550.zip
docs: add example for an external module in packages.yaml
Add an example of a 'modules:' entry for an external package in packages.yaml. The 'External Packages' section of 'Build Customization' mentions 'paths:' and 'modules:' and gives an example of paths, but not modules.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/build_settings.rst14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst
index 6e7e88bf4a..ff597922e9 100644
--- a/lib/spack/docs/build_settings.rst
+++ b/lib/spack/docs/build_settings.rst
@@ -66,8 +66,18 @@ This example lists three installations of OpenMPI, one built with GCC,
one built with GCC and debug information, and another built with Intel.
If Spack is asked to build a package that uses one of these MPIs as a
dependency, it will use the pre-installed OpenMPI in
-the given directory. ``packages.yaml`` can also be used to specify modules
-to load instead of the installation prefixes.
+the given directory. Note that the specified path is the top-level
+install prefix, not the ``bin`` subdirectory.
+
+``packages.yaml`` can also be used to specify modules to load instead
+of the installation prefixes. The following example says that module
+``CMake/3.7.2`` provides cmake version 3.7.2.
+
+.. code-block:: yaml
+
+ cmake:
+ modules:
+ cmake@3.7.2: CMake/3.7.2
Each ``packages.yaml`` begins with a ``packages:`` token, followed
by a list of package names. To specify externals, add a ``paths`` or ``modules``