make/ninja: use the right number of jobs (#34057)
This commit is contained in:
parent
fe1c105161
commit
55c77d659e
3 changed files with 11 additions and 5 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
import re
|
||||
|
||||
from spack.build_environment import MakeExecutable
|
||||
from spack.build_environment import MakeExecutable, determine_number_of_jobs
|
||||
from spack.package import *
|
||||
|
||||
|
||||
|
@ -89,5 +89,9 @@ def symlink_gmake(self):
|
|||
symlink("make", "gmake")
|
||||
|
||||
def setup_dependent_package(self, module, dspec):
|
||||
module.make = MakeExecutable(self.spec.prefix.bin.make, make_jobs)
|
||||
module.gmake = MakeExecutable(self.spec.prefix.bin.gmake, make_jobs)
|
||||
module.make = MakeExecutable(
|
||||
self.spec.prefix.bin.make, determine_number_of_jobs(parallel=dspec.package.parallel)
|
||||
)
|
||||
module.gmake = MakeExecutable(
|
||||
self.spec.prefix.bin.gmake, determine_number_of_jobs(parallel=dspec.package.parallel)
|
||||
)
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.build_environment import MakeExecutable, determine_number_of_jobs
|
||||
from spack.package import *
|
||||
from spack.util.executable import which_string
|
||||
|
||||
|
||||
class NinjaFortran(Package):
|
||||
|
@ -92,6 +94,6 @@ def setup_dependent_package(self, module, dspec):
|
|||
|
||||
module.ninja = MakeExecutable(
|
||||
which_string(name, path=[self.spec.prefix.bin], required=True),
|
||||
determine_number_of_jobs(parallel=self.parallel),
|
||||
determine_number_of_jobs(parallel=dspec.package.parallel),
|
||||
supports_jobserver=True, # This fork supports jobserver
|
||||
)
|
||||
|
|
|
@ -79,6 +79,6 @@ def setup_dependent_package(self, module, dspec):
|
|||
|
||||
module.ninja = MakeExecutable(
|
||||
which_string(name, path=[self.spec.prefix.bin], required=True),
|
||||
determine_number_of_jobs(parallel=self.parallel),
|
||||
determine_number_of_jobs(parallel=dspec.package.parallel),
|
||||
supports_jobserver=self.spec.version == ver("kitware"),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue