Skip to content
Snippets Groups Projects
Commit 8ab6539c authored by Seth R. Johnson's avatar Seth R. Johnson Committed by Peter Scheibel
Browse files

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:
parent aede2275
No related branches found
No related tags found
No related merge requests found
...@@ -50,9 +50,13 @@ class Geant4(CMakePackage): ...@@ -50,9 +50,13 @@ class Geant4(CMakePackage):
variant('opengl', default=False, description='Optional OpenGL support') variant('opengl', default=False, description='Optional OpenGL support')
variant('x11', default=False, description='Optional X11 support') variant('x11', default=False, description='Optional X11 support')
variant('motif', default=False, description='Optional motif support') variant('motif', default=False, description='Optional motif support')
variant('threads', default=True, description='Build with multithreading')
depends_on('cmake@3.5:', type='build') depends_on('cmake@3.5:', type='build')
conflicts('+cxx14', when='+cxx11')
conflicts('+cxx11', when='+cxx14')
# C++11 support # C++11 support
depends_on("clhep@2.4.0.0+cxx11~cxx14", when="@10.04+cxx11~cxx14") 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") depends_on("clhep@2.3.4.3+cxx11~cxx14", when="@10.03.p03+cxx11~cxx14")
...@@ -86,7 +90,6 @@ def cmake_args(self): ...@@ -86,7 +90,6 @@ def cmake_args(self):
'-DGEANT4_USE_G3TOG4=ON', '-DGEANT4_USE_G3TOG4=ON',
'-DGEANT4_INSTALL_DATA=ON', '-DGEANT4_INSTALL_DATA=ON',
'-DGEANT4_BUILD_TLS_MODEL=global-dynamic', '-DGEANT4_BUILD_TLS_MODEL=global-dynamic',
'-DGEANT4_BUILD_MULTITHREADED=ON',
'-DGEANT4_USE_SYSTEM_EXPAT=ON', '-DGEANT4_USE_SYSTEM_EXPAT=ON',
'-DGEANT4_USE_SYSTEM_ZLIB=ON', '-DGEANT4_USE_SYSTEM_ZLIB=ON',
'-DXERCESC_ROOT_DIR:STRING=%s' % '-DXERCESC_ROOT_DIR:STRING=%s' %
...@@ -103,7 +106,7 @@ def cmake_args(self): ...@@ -103,7 +106,7 @@ def cmake_args(self):
if '+cxx11' in spec: if '+cxx11' in spec:
options.append('-DGEANT4_BUILD_CXXSTD=c++11') options.append('-DGEANT4_BUILD_CXXSTD=c++11')
if '+cxx14' or '+cxx1y' in spec: if '+cxx14' in spec:
options.append('-DGEANT4_BUILD_CXXSTD=c++14') options.append('-DGEANT4_BUILD_CXXSTD=c++14')
if '+qt' in spec: if '+qt' in spec:
...@@ -117,6 +120,9 @@ def cmake_args(self): ...@@ -117,6 +120,9 @@ def cmake_args(self):
options.append('-DUSolids_DIR=%s' % spec[ options.append('-DUSolids_DIR=%s' % spec[
'vecgeom'].prefix.lib.CMake.USolids) '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 return options
def url_for_version(self, version): def url_for_version(self, version):
......
...@@ -60,6 +60,7 @@ class Moab(AutotoolsPackage): ...@@ -60,6 +60,7 @@ class Moab(AutotoolsPackage):
variant('irel', default=False, description='Enable irel interface') variant('irel', default=False, description='Enable irel interface')
variant('fbigeom', default=False, description='Enable fbigeom interface') variant('fbigeom', default=False, description='Enable fbigeom interface')
variant('coupler', default=True, description='Enable mbcoupler tool') 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("debug", default=False, description='enable debug symbols')
variant('shared', default=False, variant('shared', default=False,
...@@ -162,6 +163,11 @@ def configure_args(self): ...@@ -162,6 +163,11 @@ def configure_args(self):
else: else:
options.append('--disable-mbcoupler') options.append('--disable-mbcoupler')
if '+dagmc' in spec:
options.append('--enable-dagmc')
else:
options.append('--disable-dagmc')
if '+metis' in spec: if '+metis' in spec:
options.append('--with-metis=%s' % spec['metis'].prefix) options.append('--with-metis=%s' % spec['metis'].prefix)
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment