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
This commit is contained in:
		| @@ -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 @@ def install(self, spec, prefix): | ||||
| 
 | ||||
|     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), | ||||
|         ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Tom Scogland
					Tom Scogland