Skip to content
Open
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
6 changes: 6 additions & 0 deletions easybuild/easyblocks/generic/cmakemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def extra_options(extra_vars=None):
extra_vars.update({
'srcdir': [None, "Source directory location to provide to cmake command", CUSTOM],
'separate_build_dir': [False, "Perform build in a separate directory", CUSTOM],
'create_installdir_before_configure': [False, "Create or clean the install directory prior to running cmake", CUSTOM],
})
return extra_vars

Expand All @@ -60,6 +61,11 @@ def configure_step(self, srcdir=None, builddir=None):
if builddir is not None:
self.log.nosupport("CMakeMake.configure_step: named argument 'builddir' (should be 'srcdir')", "2.0")

if self.cfg['create_installdir_before_configure']:
self.log.info("Cleaning and creating the install directory. Setting keeppreviousinstall to True.")
self.make_installdir()
self.cfg['keeppreviousinstall'] = True

# Set the search paths for CMake
include_paths = os.pathsep.join(self.toolchain.get_variable("CPPFLAGS", list))
library_paths = os.pathsep.join(self.toolchain.get_variable("LDFLAGS", list))
Expand Down