[dd4hep] variant and run env updates (#16524)
* [dd4hep] variant and run env updates * address comments from #16524
This commit is contained in:
parent
6e46603470
commit
69ea6de069
@ -36,7 +36,7 @@ class Dd4hep(CMakePackage):
|
|||||||
|
|
||||||
variant('xercesc', default=False, description="Enable 'Detector Builders' based on XercesC")
|
variant('xercesc', default=False, description="Enable 'Detector Builders' based on XercesC")
|
||||||
variant('geant4', default=False, description="Enable the simulation part based on Geant4")
|
variant('geant4', default=False, description="Enable the simulation part based on Geant4")
|
||||||
variant('testing', default=False, description="Enable and build tests")
|
variant('assimp', default=False, description="Enable CAD interface based on Assimp")
|
||||||
|
|
||||||
depends_on('cmake @3.12:', type='build')
|
depends_on('cmake @3.12:', type='build')
|
||||||
depends_on('boost @1.49:')
|
depends_on('boost @1.49:')
|
||||||
@ -44,6 +44,7 @@ class Dd4hep(CMakePackage):
|
|||||||
extends('python')
|
extends('python')
|
||||||
depends_on('xerces-c', when='+xercesc')
|
depends_on('xerces-c', when='+xercesc')
|
||||||
depends_on('geant4@10.2.2:', when='+geant4')
|
depends_on('geant4@10.2.2:', when='+geant4')
|
||||||
|
depends_on('assimp', when='+assimp')
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
@ -55,13 +56,18 @@ def cmake_args(self):
|
|||||||
"-DCMAKE_CXX_STANDARD={0}".format(cxxstd),
|
"-DCMAKE_CXX_STANDARD={0}".format(cxxstd),
|
||||||
"-DDD4HEP_USE_XERCESC={0}".format(spec.satisfies('+xercesc')),
|
"-DDD4HEP_USE_XERCESC={0}".format(spec.satisfies('+xercesc')),
|
||||||
"-DDD4HEP_USE_GEANT4={0}".format(spec.satisfies('+geant4')),
|
"-DDD4HEP_USE_GEANT4={0}".format(spec.satisfies('+geant4')),
|
||||||
"-DBUILD_TESTING={0}".format(spec.satisfies('+testing')),
|
"-DDD4HEP_LOAD_ASSIMP={0}".format(spec.satisfies('+assimp')),
|
||||||
|
"-DBUILD_TESTING={0}".format(self.run_tests),
|
||||||
"-DBOOST_ROOT={0}".format(spec['boost'].prefix),
|
"-DBOOST_ROOT={0}".format(spec['boost'].prefix),
|
||||||
"-DBoost_NO_BOOST_CMAKE=ON",
|
"-DBoost_NO_BOOST_CMAKE=ON",
|
||||||
"-DPYTHON_EXECUTABLE={0}".format(spec['python'].command.path),
|
"-DPYTHON_EXECUTABLE={0}".format(spec['python'].command.path),
|
||||||
]
|
]
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
def setup_run_environment(self, env):
|
||||||
|
# used p.ex. in ddsim to find DDDetectors dir
|
||||||
|
env.set("DD4hepINSTALL", self.prefix)
|
||||||
|
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
# dd4hep releases are dashes and padded with a leading zero
|
# dd4hep releases are dashes and padded with a leading zero
|
||||||
# the patch version is omitted when 0
|
# the patch version is omitted when 0
|
||||||
|
Loading…
Reference in New Issue
Block a user