Skip to content

Commit

Permalink
Merge pull request #2324 from geimer/pdt_handle_compiler_flags
Browse files Browse the repository at this point in the history
pass $CXXFLAGS to PDT's configure script via '-useropt'
  • Loading branch information
boegel authored Feb 19, 2021
2 parents c1ec74e + 8b60cdf commit d2b5618
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion easybuild/easyblocks/p/pdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ def configure_step(self):
raise EasyBuildError("Compiler family not supported yet: %s" % comp_fam)
self.cfg.update('configopts', compiler_opt)

# PDT's configure script ignores CFLAGS/CXXFLAGS set in the environment,
# but allows to pass in custom flags via configure option
useropt = os.getenv('CXXFLAGS')
if self.toolchain.options['pic']:
self.cfg.update('-useropt=-fPIC')
useropt += ' -fPIC'
self.cfg.update('configopts', '-useropt="%s"' % useropt)

# Configure creates required subfolders in installdir, so create first (but only once, during first iteration)
if self.iter_idx == 0:
Expand Down

0 comments on commit d2b5618

Please sign in to comment.