Skip to content

Commit

Permalink
Merge pull request #1073 from tobbez/patch-rosetta-cxx-module-only
Browse files Browse the repository at this point in the history
Make the Rosetta EasyBlock work in --module-only mode
  • Loading branch information
boegel authored Dec 20, 2016
2 parents ac4dcea + da79f3a commit 70102d1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions easybuild/easyblocks/r/rosetta.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ def extract_step(self):
except OSError, err:
raise EasyBuildError("Getting Rosetta sources dir ready failed: %s", err)

def detect_cxx(self):
"""Detect compiler name"""
self.cxx = os.getenv('CC_SEQ')
if self.cxx is None:
self.cxx = os.getenv('CC')

def configure_step(self):
"""
Configure build by creating tools/build/user.settings from configure options.
Expand All @@ -89,9 +95,7 @@ def configure_step(self):
defines = ['NDEBUG']
self.cfg.update('buildopts', "mode=release")

self.cxx = os.getenv('CC_SEQ')
if self.cxx is None:
self.cxx = os.getenv('CC')
self.detect_cxx()
cxx_ver = None
if self.toolchain.comp_family() in [toolchain.GCC]: #@UndefinedVariable
cxx_ver = '.'.join(get_software_version('GCC').split('.')[:2])
Expand Down Expand Up @@ -258,6 +262,11 @@ def extract_and_copy(dirname_tmpl, optional=False):
def sanity_check_step(self):
"""Custom sanity check for Rosetta."""

# self.cxx is usually set by the configure step, but if configure is
# not executed (e.g. with --module-only), we need to set it here.
if self.cxx is None:
self.detect_cxx()

infix = ''
if self.toolchain.options.get('usempi', None):
infix = 'mpi.'
Expand Down

0 comments on commit 70102d1

Please sign in to comment.