Add important variants to MOAB and Geant4 (#9409)
* Add option to disable threads for Geant4 * Add option to enable DagMC in MOAB * Explicitly add OFF flag when threading is disabled * Fix unintentional enabling of C++14 in Geant4 The following always evaluated to True: 'c++14' or 'c++1y' in spec:
This commit is contained in:
parent
aede227580
commit
8ab6539c0e
@ -50,9 +50,13 @@ class Geant4(CMakePackage):
|
||||
variant('opengl', default=False, description='Optional OpenGL support')
|
||||
variant('x11', default=False, description='Optional X11 support')
|
||||
variant('motif', default=False, description='Optional motif support')
|
||||
variant('threads', default=True, description='Build with multithreading')
|
||||
|
||||
depends_on('cmake@3.5:', type='build')
|
||||
|
||||
conflicts('+cxx14', when='+cxx11')
|
||||
conflicts('+cxx11', when='+cxx14')
|
||||
|
||||
# C++11 support
|
||||
depends_on("clhep@2.4.0.0+cxx11~cxx14", when="@10.04+cxx11~cxx14")
|
||||
depends_on("clhep@2.3.4.3+cxx11~cxx14", when="@10.03.p03+cxx11~cxx14")
|
||||
@ -86,7 +90,6 @@ def cmake_args(self):
|
||||
'-DGEANT4_USE_G3TOG4=ON',
|
||||
'-DGEANT4_INSTALL_DATA=ON',
|
||||
'-DGEANT4_BUILD_TLS_MODEL=global-dynamic',
|
||||
'-DGEANT4_BUILD_MULTITHREADED=ON',
|
||||
'-DGEANT4_USE_SYSTEM_EXPAT=ON',
|
||||
'-DGEANT4_USE_SYSTEM_ZLIB=ON',
|
||||
'-DXERCESC_ROOT_DIR:STRING=%s' %
|
||||
@ -103,7 +106,7 @@ def cmake_args(self):
|
||||
|
||||
if '+cxx11' in spec:
|
||||
options.append('-DGEANT4_BUILD_CXXSTD=c++11')
|
||||
if '+cxx14' or '+cxx1y' in spec:
|
||||
if '+cxx14' in spec:
|
||||
options.append('-DGEANT4_BUILD_CXXSTD=c++14')
|
||||
|
||||
if '+qt' in spec:
|
||||
@ -117,6 +120,9 @@ def cmake_args(self):
|
||||
options.append('-DUSolids_DIR=%s' % spec[
|
||||
'vecgeom'].prefix.lib.CMake.USolids)
|
||||
|
||||
on_or_off = lambda opt: 'ON' if '+' + opt in spec else 'OFF'
|
||||
options.append('-DGEANT4_BUILD_MULTITHREADED=' + on_or_off('threads'))
|
||||
|
||||
return options
|
||||
|
||||
def url_for_version(self, version):
|
||||
|
@ -60,6 +60,7 @@ class Moab(AutotoolsPackage):
|
||||
variant('irel', default=False, description='Enable irel interface')
|
||||
variant('fbigeom', default=False, description='Enable fbigeom interface')
|
||||
variant('coupler', default=True, description='Enable mbcoupler tool')
|
||||
variant('dagmc', default=False, description='Enable dagmc tool')
|
||||
|
||||
variant("debug", default=False, description='enable debug symbols')
|
||||
variant('shared', default=False,
|
||||
@ -162,6 +163,11 @@ def configure_args(self):
|
||||
else:
|
||||
options.append('--disable-mbcoupler')
|
||||
|
||||
if '+dagmc' in spec:
|
||||
options.append('--enable-dagmc')
|
||||
else:
|
||||
options.append('--disable-dagmc')
|
||||
|
||||
if '+metis' in spec:
|
||||
options.append('--with-metis=%s' % spec['metis'].prefix)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user