Skip to content

Commit

Permalink
Merge pull request #1814 from smoors/boost-1.71.0
Browse files Browse the repository at this point in the history
fix Boost easyblock for versions >=1.71.0
  • Loading branch information
Micket committed Sep 27, 2019
2 parents 43d9c0f + e53e625 commit 1494af7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions easybuild/easyblocks/b/boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ def __init__(self, *args, **kwargs):

self.pyvers = []

if LooseVersion(self.version) >= LooseVersion("1.71.0"):
self.bjamcmd = 'b2'
else:
self.bjamcmd = 'bjam'

@staticmethod
def extra_options():
"""Add extra easyconfig parameters for Boost."""
Expand Down Expand Up @@ -170,13 +175,14 @@ def configure_step(self):
def build_boost_variant(self, bjamoptions, paracmd):
"""Build Boost library with specified options for bjam."""
# build with specified options
cmd = "%s ./bjam %s %s %s" % (self.cfg['prebuildopts'], bjamoptions, paracmd, self.cfg['buildopts'])
cmd = "%s ./%s %s %s %s" % (self.cfg['prebuildopts'], self.bjamcmd, bjamoptions, paracmd, self.cfg['buildopts'])
run_cmd(cmd, log_all=True, simple=True)
# install built Boost library
cmd = "%s ./bjam %s install %s %s" % (self.cfg['preinstallopts'], bjamoptions, paracmd, self.cfg['installopts'])
cmd = "%s ./%s %s install %s %s" % (
self.cfg['preinstallopts'], self.bjamcmd, bjamoptions, paracmd, self.cfg['installopts'])
run_cmd(cmd, log_all=True, simple=True)
# clean up before proceeding with next build
run_cmd("./bjam --clean-all", log_all=True, simple=True)
run_cmd("./%s --clean-all" % self.bjamcmd, log_all=True, simple=True)

def build_step(self):
"""Build Boost with bjam tool."""
Expand Down Expand Up @@ -231,7 +237,8 @@ def build_step(self):
# install remainder of boost libraries
self.log.info("Installing boost libraries")

cmd = "%s ./bjam %s install %s %s" % (self.cfg['preinstallopts'], bjamoptions, paracmd, self.cfg['installopts'])
cmd = "%s ./%s %s install %s %s" % (
self.cfg['preinstallopts'], self.bjamcmd, bjamoptions, paracmd, self.cfg['installopts'])
run_cmd(cmd, log_all=True, simple=True)

def install_step(self):
Expand Down

0 comments on commit 1494af7

Please sign in to comment.