summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2013-02-21 20:05:11 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2013-02-21 20:05:11 -0800
commit5899308ad371790c4c89399f61a23f6ed1e5d0fc (patch)
treee1f6cc8fe7561eea421d2fd4b950cd33748fd761 /lib
parentbd59689fdcfd1e64a8e0926c6e9c0a4d1513f2e1 (diff)
downloadspack-5899308ad371790c4c89399f61a23f6ed1e5d0fc.tar.gz
spack-5899308ad371790c4c89399f61a23f6ed1e5d0fc.tar.bz2
spack-5899308ad371790c4c89399f61a23f6ed1e5d0fc.tar.xz
spack-5899308ad371790c4c89399f61a23f6ed1e5d0fc.zip
Parallel bootstrap for cmake.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/Package.py3
-rw-r--r--lib/spack/spack/packages/cmake.py3
2 files changed, 5 insertions, 1 deletions
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 @@ class Package(object):
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')