diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/warpx/package.py | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/warpx/package.py b/var/spack/repos/builtin/packages/warpx/package.py index a3d7bf2abd..8d3d07d8b9 100644 --- a/var/spack/repos/builtin/packages/warpx/package.py +++ b/var/spack/repos/builtin/packages/warpx/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * +from spack.compiler import UnsupportedCompilerFlag class Warpx(MakefilePackage): @@ -38,13 +39,27 @@ class Warpx(MakefilePackage): resource(name='amrex', git='https://github.com/AMReX-Codes/amrex.git', + when='@master', + tag='master', + placement='amrex') + + resource(name='amrex', + git='https://github.com/AMReX-Codes/amrex.git', + when='@dev', tag='development', - destination='.') + placement='amrex') resource(name='picsar', git='https://bitbucket.org/berkeleylab/picsar.git', tag='master', - destination='.') + placement='picsar') + + @property + def build_targets(self): + if self.spec.satisfies('%clang'): + return ['CXXFLAGS={0}'.format(self.compiler.cxx11_flag)] + else: + return [] def edit(self, spec, prefix): @@ -68,8 +83,14 @@ class Warpx(MakefilePackage): 'USE_PSATD = {0}'.format(torf('+psatd'))) makefile.filter('DO_ELECTROSTATIC .*', 'DO_ELECTROSTATIC = %s' % torf('+do_electrostatic')) + try: + self.compiler.openmp_flag + except UnsupportedCompilerFlag: + use_omp = 'FALSE' + else: + use_omp = torf('+openmp') makefile.filter('USE_OMP .*', - 'USE_OMP = {0}'.format(torf('+openmp'))) + 'USE_OMP = {0}'.format(use_omp)) makefile.filter('DEBUG .*', 'DEBUG = {0}'.format(torf('+debug'))) makefile.filter('TINY_PROFILE .*', |