summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElizabeth F <rpf2116@columbia.edu>2016-04-27 20:57:04 -0400
committerElizabeth F <rpf2116@columbia.edu>2016-04-27 20:57:04 -0400
commit4d466fe879820e18f18e96809f6825d393792de3 (patch)
treea84a9a9d92e09dfd7b03317e00fb3070b82e41df
parent4a6b5d52475095a865d1bb98db1dd136a24607b1 (diff)
downloadspack-4d466fe879820e18f18e96809f6825d393792de3.tar.gz
spack-4d466fe879820e18f18e96809f6825d393792de3.tar.bz2
spack-4d466fe879820e18f18e96809f6825d393792de3.tar.xz
spack-4d466fe879820e18f18e96809f6825d393792de3.zip
spack setup: Fix broken module convenience settings.
-rw-r--r--lib/spack/spack/package.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 51ee3d7d8b..ceb1a499a5 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -1497,8 +1497,21 @@ def make_executable(path):
os.chmod(path, mode)
+
class CMakePackage(StagedPackage):
+ def make_make(self):
+ import multiprocessing
+ # number of jobs spack will to build with.
+ jobs = multiprocessing.cpu_count()
+ if not self.parallel:
+ jobs = 1
+ elif self.make_jobs:
+ jobs = self.make_jobs
+
+ make = spack.build_environment.MakeExecutable('make', jobs)
+ return make
+
def configure_args(self):
"""Returns package-specific arguments to be provided to the configure command."""
return list()
@@ -1576,10 +1589,12 @@ env = dict()
cmake(self.source_directory, *options)
def install_build(self):
+ make = self.make_make()
with working_dir(self.build_directory, create=False):
make()
def install_install(self):
+ make = self.make_make()
with working_dir(self.build_directory, create=False):
make('install')