diff --git a/lib/spack/spack/Package.py b/lib/spack/spack/Package.py index e5b2d00943..0455b048c9 100644 --- a/lib/spack/spack/Package.py +++ b/lib/spack/spack/Package.py @@ -131,6 +131,9 @@ def add_commands_to_module(self): self.module.make = MakeExecutable('make', self.parallel) self.module.gmake = MakeExecutable('gmake', self.parallel) + # number of jobs spack prefers to build with. + self.module.make_jobs = multiprocessing.cpu_count() + # Find the configure script in the archive path # Don't use which for this; we want to find it in the current dir. self.module.configure = Executable('./configure') diff --git a/lib/spack/spack/packages/cmake.py b/lib/spack/spack/packages/cmake.py index 57cb0d9cf9..9b75bd6273 100644 --- a/lib/spack/spack/packages/cmake.py +++ b/lib/spack/spack/packages/cmake.py @@ -6,6 +6,7 @@ class Cmake(Package): md5 = '097278785da7182ec0aea8769d06860c' def install(self, prefix): - configure('--prefix=%s' % prefix) + configure('--prefix=%s' % prefix, + '--parallel=%s' % make_jobs) make() make('install')