diff options
author | Tom Scogland <scogland1@llnl.gov> | 2022-08-26 02:37:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-26 03:37:53 -0600 |
commit | a2f05880042d0e38eb2418a24668f87fc42f0f18 (patch) | |
tree | 3628107248e9db9170b9ee3222230fbb849d71ca | |
parent | b31cd189a712fe9499e0b9f8f5863797517038d0 (diff) | |
download | spack-a2f05880042d0e38eb2418a24668f87fc42f0f18.tar.gz spack-a2f05880042d0e38eb2418a24668f87fc42f0f18.tar.bz2 spack-a2f05880042d0e38eb2418a24668f87fc42f0f18.tar.xz spack-a2f05880042d0e38eb2418a24668f87fc42f0f18.zip |
calculate make_jobs in ninja (#32384)
This is in case ninja's setup_dependent_package is called before its
module is initialized by build_environment
-rw-r--r-- | var/spack/repos/builtin/packages/ninja/package.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py index 9ae951f0b3..5321d55041 100644 --- a/var/spack/repos/builtin/packages/ninja/package.py +++ b/var/spack/repos/builtin/packages/ninja/package.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import sys -from spack.build_environment import MakeExecutable +from spack.build_environment import MakeExecutable, determine_number_of_jobs from spack.package import * from spack.util.executable import which_string @@ -74,6 +74,8 @@ class Ninja(Package): def setup_dependent_package(self, module, dspec): name = "ninja" + module.ninja = MakeExecutable( - which_string(name, path=[self.spec.prefix.bin], required=True), module.make_jobs + which_string(name, path=[self.spec.prefix.bin], required=True), + determine_number_of_jobs(parallel=self.parallel), ) |