hepmcanalysis: propagate cxxstd from root (#29512)
* Use same cxx value as root * Remove pointer syntax from non-pointer type in source * Run patch function before build * Use raw string in filter_file and merge edit function with patch * Escape parentheses * Use gDirectory from ROOT instead of CurrentDirectory function
This commit is contained in:
parent
dd67f46c6b
commit
56ba61c52f
@ -22,17 +22,14 @@ class Hepmcanalysis(MakefilePackage):
|
|||||||
depends_on('root')
|
depends_on('root')
|
||||||
depends_on('clhep')
|
depends_on('clhep')
|
||||||
|
|
||||||
variant('cxxstd',
|
|
||||||
default='11',
|
|
||||||
values=('11', '14', '17'),
|
|
||||||
multi=False,
|
|
||||||
description='Use the specified C++ standard when building.')
|
|
||||||
|
|
||||||
patch('lcg.patch')
|
patch('lcg.patch')
|
||||||
|
|
||||||
def edit(self, spec, prefix):
|
def patch(self):
|
||||||
|
filter_file(r"TDirectory::CurrentDirectory\(\)",
|
||||||
|
r"gDirectory",
|
||||||
|
"src/baseAnalysis.cc")
|
||||||
filter_file(r"CXXFLAGS(.*)", r"CXXFLAGS\1 -std=c++" +
|
filter_file(r"CXXFLAGS(.*)", r"CXXFLAGS\1 -std=c++" +
|
||||||
self.spec.variants['cxxstd'].value, "config.mk")
|
self.spec['root'].variants['cxxstd'].value, "config.mk")
|
||||||
|
|
||||||
def setup_build_environment(self, env):
|
def setup_build_environment(self, env):
|
||||||
env.set("HepMCdir", self.spec['hepmc'].prefix)
|
env.set("HepMCdir", self.spec['hepmc'].prefix)
|
||||||
|
Loading…
Reference in New Issue
Block a user