Skip to content
Merged
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
8 changes: 7 additions & 1 deletion easybuild/easyblocks/generic/cmakemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.build_log import print_warning
from easybuild.tools.config import build_option
from easybuild.tools.filetools import change_dir, mkdir, which
from easybuild.tools.filetools import change_dir, mkdir, which, remove_dir
from easybuild.tools.environment import setvar
from easybuild.tools.modules import get_software_root
from easybuild.tools.run import run_cmd
Expand Down Expand Up @@ -120,6 +120,12 @@ def configure_step(self, srcdir=None, builddir=None):

if builddir is None and self.cfg.get('separate_build_dir', True):
builddir = os.path.join(self.builddir, 'easybuild_obj')
# For separate_build_dir we want a clean folder. So remove if it exists
# This can happen when multiple iterations are done (e.g. shared, static, ...)
if os.path.exists(builddir):
self.log.warning('Build directory %s already exists (from previous iterations?). Removing...',
builddir)
remove_dir(builddir)

if builddir:
mkdir(builddir, parents=True)
Expand Down