summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave <grote1@llnl.gov>2019-06-12 14:57:20 -0700
committerAxel Huebl <axel.huebl@plasma.ninja>2019-06-12 23:57:20 +0200
commitfe8297da74d9bcc1a3204a1019b949a80f7bfe40 (patch)
treecac2dd4039273e2cdb920106407de523f9bd5222
parenta32382e78772da78058d7560e33046d8d9617389 (diff)
downloadspack-fe8297da74d9bcc1a3204a1019b949a80f7bfe40.tar.gz
spack-fe8297da74d9bcc1a3204a1019b949a80f7bfe40.tar.bz2
spack-fe8297da74d9bcc1a3204a1019b949a80f7bfe40.tar.xz
spack-fe8297da74d9bcc1a3204a1019b949a80f7bfe40.zip
warpx: only allow master branch, and fix build on darwin (#11667)
* warpx: only allow master branch, and fix build on darwin * warpx: Added CXXFLAGS=-std=c++11 for clang * warpx: further clean up of openmp and c++11 flags * warpx: Get around the problem with resources The update uses placement instead of destination
-rw-r--r--var/spack/repos/builtin/packages/warpx/package.py27
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 .*',