diff options
author | Miguel <63242832+mandresm@users.noreply.github.com> | 2024-06-25 19:24:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-25 11:24:49 -0600 |
commit | 536856874cb67aa849d9cb742154addfdd5cc140 (patch) | |
tree | 488002f18525c12cd2bfbb5af7540921b0c3fc76 | |
parent | 8d1aaef8b850ad64cb7121dfa7aaded49715567f (diff) | |
download | spack-536856874cb67aa849d9cb742154addfdd5cc140.tar.gz spack-536856874cb67aa849d9cb742154addfdd5cc140.tar.bz2 spack-536856874cb67aa849d9cb742154addfdd5cc140.tar.xz spack-536856874cb67aa849d9cb742154addfdd5cc140.zip |
add documentation for make_jobs variable (#44838)
* add documentation for make_jobs variable
* apply suggested changes
* Update packaging_guide.rst
add suggestions to the documentation
* Update packaging_guide.rst
fix missing quotes in the documentation
* suggestions to packaging_guide.rst
-rw-r--r-- | lib/spack/docs/packaging_guide.rst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 46ab71b93f..ed61bdf81b 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -2344,6 +2344,27 @@ you set ``parallel`` to ``False`` at the package level, then each call to ``make()`` will be sequential by default, but packagers can call ``make(parallel=True)`` to override it. +Note that the `--jobs` option works out of the box for all standard +build systems. If you are using a non-standard build system instead, you +can use the variable `make_jobs` to extract the number of jobs specified +by the `--jobs` option: + +.. code-block:: python + :emphasize-lines: 7, 11 + :linenos: + + class Xios(Package): + ... + def install(self, spec, prefix): + ... + options = [ + ... + '--jobs', str(make_jobs), + ] + ... + make_xios = Executable("./make_xios") + make_xios(*options) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Install-level build parallelism ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |