Rivet: syntax fixes (#22225)

This commit is contained in:
iarspider 2021-03-12 18:52:07 +01:00 committed by GitHub
parent 24b7aff837
commit b2ece3abba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,16 +155,15 @@ def setup_build_environment(self, env):
fjcontrib_home = self.spec['fjcontrib'].prefix fjcontrib_home = self.spec['fjcontrib'].prefix
env.prepend_path('LD_LIBRARY_PATH', fjcontrib_home.lib) env.prepend_path('LD_LIBRARY_PATH', fjcontrib_home.lib)
@when('@3.1.2:')
def flag_handler(self, name, flags): def flag_handler(self, name, flags):
if name == 'cxxflags': if self.spec.satisfies('@3.1.2:') and name == 'cxxflags':
flags.append('-faligned-new') flags.append('-faligned-new')
return (None, None, flags) return (None, None, flags)
return (flags, None, None) return (flags, None, None)
def configure_args(self): def configure_args(self):
args = [] args = []
if self.spec.variants['hepmc'] == '2': if self.spec.variants['hepmc'].value == '2':
args += ['--with-hepmc=' + self.spec['hepmc'].prefix] args += ['--with-hepmc=' + self.spec['hepmc'].prefix]
else: else:
args += ['--with-hepmc3=' + self.spec['hepmc'].prefix] args += ['--with-hepmc3=' + self.spec['hepmc'].prefix]