diff options
author | Seth R. Johnson <johnsonsr@ornl.gov> | 2018-10-09 20:05:49 -0400 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2018-10-09 17:05:49 -0700 |
commit | 8ab6539c0e441a08ad886c7936cd70213111c539 (patch) | |
tree | eb3027acc99288a12f7cda9b66c19b8095138c08 /var | |
parent | aede2275803e2e4ab003ef689b45c0203fb6d874 (diff) | |
download | spack-8ab6539c0e441a08ad886c7936cd70213111c539.tar.gz spack-8ab6539c0e441a08ad886c7936cd70213111c539.tar.bz2 spack-8ab6539c0e441a08ad886c7936cd70213111c539.tar.xz spack-8ab6539c0e441a08ad886c7936cd70213111c539.zip |
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:
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/geant4/package.py | 10 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/moab/package.py | 6 |
2 files changed, 14 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py index aa16b8e856..b40fd27d5d 100644 --- a/var/spack/repos/builtin/packages/geant4/package.py +++ b/var/spack/repos/builtin/packages/geant4/package.py @@ -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 @@ class Geant4(CMakePackage): '-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 @@ class Geant4(CMakePackage): 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 @@ class Geant4(CMakePackage): 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): diff --git a/var/spack/repos/builtin/packages/moab/package.py b/var/spack/repos/builtin/packages/moab/package.py index ae1ef0c35a..d0b1761fcd 100644 --- a/var/spack/repos/builtin/packages/moab/package.py +++ b/var/spack/repos/builtin/packages/moab/package.py @@ -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 @@ class Moab(AutotoolsPackage): 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: |