Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions easybuild/easyblocks/a/armadillo.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def configure_step(self):
self.cfg.update('configopts', '-DBLAS_LIBRARY:PATH="%s"' % os.getenv('LIBBLAS'))
self.cfg.update('configopts', '-DLAPACK_LIBRARY:PATH="%s"' % os.getenv('LIBLAPACK'))

# enable out-of-source build (until it becomes the default)
self.cfg['separate_build_dir'] = True

super(EB_Armadillo, self).configure_step()

def sanity_check_step(self):
Expand Down
10 changes: 2 additions & 8 deletions easybuild/easyblocks/b/bamtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,8 @@ class EB_BamTools(MakeCp, CMakeMake):

def configure_step(self):
"""Configure BamTools build."""
# BamTools requires an out of source build.
builddir = os.path.join(self.cfg['start_dir'], 'build')
try:
mkdir(builddir)
os.chdir(builddir)
except OSError, err:
raise EasyBuildError("Failed to move to %s: %s", builddir, err)

# BamTools requires an out of source build, so enable it (until it becomes the default)
self.cfg['separate_build_dir'] = True
CMakeMake.configure_step(self, srcdir='..')

def sanity_check_step(self):
Expand Down
3 changes: 3 additions & 0 deletions easybuild/easyblocks/c/cgal.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def configure_step(self):

os.environ['BOOST_ROOT'] = get_software_root("Boost")

# enable out-of-source build (until it becomes the default)
self.cfg['separate_build_dir'] = True

super(EB_CGAL, self).configure_step()

def sanity_check_step(self):
Expand Down
3 changes: 3 additions & 0 deletions easybuild/easyblocks/c/clang.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ def configure_step(self):
if self.cfg['parallel']:
self.make_parallel_opts = "-j %s" % self.cfg['parallel']

# disable regular out-of-source build, too simplistic for Clang to work
self.cfg['separate_build_dir'] = False

self.log.info("Configuring")
super(EB_Clang, self).configure_step(srcdir=self.llvm_src_dir)

Expand Down
4 changes: 4 additions & 0 deletions easybuild/easyblocks/g/gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ def configure_step(self):
"""Custom configure procedure for GATE: CMake for versions 6.2 or more recent."""

if LooseVersion(self.version) >= '6.2':

# enable out-of-source build (until it becomes the default)
self.cfg['separate_build_dir'] = True

super(EB_GATE, self).configure_step()

def build_step(self):
Expand Down
7 changes: 4 additions & 3 deletions easybuild/easyblocks/g/geant4.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ def configure_step(self):

# Geant4 switched to a CMake build system in version 9.4
if LooseVersion(self.version) >= LooseVersion("9.4"):
mkdir('configdir')
os.chdir('configdir')
super(EB_Geant4, self).configure_step(srcdir="..")
# enable out-of-source build
self.cfg['separate_build_dir'] = True

super(EB_Geant4, self).configure_step()

else:
pwd = self.cfg['start_dir']
Expand Down
3 changes: 3 additions & 0 deletions easybuild/easyblocks/g/gromacs.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ def configure_step(self):
else:
self.cfg.update('configopts', "-DGMX_GSL=OFF")

# enable out-of-source build (until it becomes the default)
self.cfg['separate_build_dir'] = True

# complete configuration with configure_method of parent
out = super(EB_GROMACS, self).configure_step()

Expand Down
22 changes: 16 additions & 6 deletions easybuild/easyblocks/generic/cmakemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,15 @@ class CMakeMake(ConfigureMake):
@staticmethod
def extra_options(extra_vars=None):
"""Define extra easyconfig parameters specific to CMakeMake."""
extra_vars = ConfigureMake.extra_options(extra_vars)
extra_vars.update({
extra = {
'srcdir': [None, "Source directory location to provide to cmake command", CUSTOM],
'separate_build_dir': [False, "Perform build in a separate directory", CUSTOM],
})
return extra_vars
'separate_build_dir': [None, "Perform build in a separate directory", CUSTOM],
}

if extra_vars is not None:
extra.update(extra_vars)

return ConfigureMake.extra_options(extra)

def configure_step(self, srcdir=None, builddir=None):
"""Configure build using cmake"""
Expand All @@ -67,7 +70,14 @@ def configure_step(self, srcdir=None, builddir=None):
setvar("CMAKE_LIBRARY_PATH", library_paths)

default_srcdir = '.'
if self.cfg.get('separate_build_dir', False):

separate_build_dir = self.cfg['separate_build_dir']
if self.cfg['separate_build_dir'] is None:
msg = "Easyconfig parameter 'separate_build_dir' (custom to CMakeMake easyblock) has not set explicitely "
msg += "to True or False; default value in the future will be True"
self.log.deprecated(msg, '3.0')

if separate_build_dir:
objdir = os.path.join(self.builddir, 'easybuild_obj')
try:
os.mkdir(objdir)
Expand Down
3 changes: 3 additions & 0 deletions easybuild/easyblocks/generic/cmakepythonpackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def configure_step(self, *args, **kwargs):

PythonPackage.configure_step(self, *args, **kwargs)

# enable out-of-source build (until it becomes the default)
self.cfg['separate_build_dir'] = True

return CMakeMake.configure_step(self, *args, **kwargs)

def build_step(self, *args, **kwargs):
Expand Down
3 changes: 3 additions & 0 deletions easybuild/easyblocks/n/netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ def configure_step(self):
if hdf5:
env.setvar('HDF5_ROOT', hdf5)

# enable out-of-source build (until it becomes the default)
self.cfg['separate_build_dir'] = True

CMakeMake.configure_step(self)

def sanity_check_step(self):
Expand Down
6 changes: 4 additions & 2 deletions easybuild/easyblocks/o/openbabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class EB_OpenBabel(CMakeMake):
"""Support for installing the OpenBabel package."""

def configure_step(self):
# Use separate build directory
self.cfg['separate_build_dir'] = True
"""Custom configure procedure for OpenBabel."""

self.cfg['configopts'] += "-DENABLE_TESTS=ON "
# Needs wxWidgets
Expand All @@ -60,6 +59,9 @@ def configure_step(self):
else:
self.log.info("Not using Eigen")

# enable out-of-source build
self.cfg['separate_build_dir'] = True

super(EB_OpenBabel, self).configure_step()

def sanity_check_step(self):
Expand Down
3 changes: 2 additions & 1 deletion easybuild/easyblocks/p/psi.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def __init__(self, *args, **kwargs):
@staticmethod
def extra_options():
"""Extra easyconfig parameters specific to PSI."""

extra_vars = {
# always include running PSI unit tests (takes about 2h or less)
'runtest': ["tests TESTFLAGS='-u -q'", "Run tests included with PSI, without interruption.", BUILD],
Expand Down Expand Up @@ -144,6 +143,8 @@ def configure_step(self):
if get_software_root('impi'):
self.cfg['configopts'] += "-DENABLE_CSR=ON -DBLAS_TYPE=MKL "

# make sure out-of-source build is disabled (already done here)
self.cfg['separate_build_dir'] = False
CMakeMake.configure_step(self, srcdir=self.cfg['start_dir'])

def install_step(self):
Expand Down
9 changes: 2 additions & 7 deletions easybuild/easyblocks/t/trilinos.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,8 @@ def configure_step(self):
for ext in skip_exts:
self.cfg.update('configopts', "-DTrilinos_ENABLE_%s:BOOL=OFF" % ext)

# building in source dir not supported
try:
build_dir = "BUILD"
os.mkdir(build_dir)
os.chdir(build_dir)
except OSError, err:
raise EasyBuildError("Failed to create and move into build directory: %s", err)
# building in source dir not supported, so enable out-of-source build (until it becomes the default)
self.cfg['separate_build_dir'] = True

# configure using cmake
super(EB_Trilinos, self).configure_step(srcdir="..")
Expand Down