From a403a1ca6842d7123e3a3e7cf6d070d6d6747836 Mon Sep 17 00:00:00 2001 From: David Beckingsale Date: Mon, 12 Feb 2018 13:34:54 -0500 Subject: [PATCH] RAJA package: add versions and CUDA/openmp support (#7201) --- .../repos/builtin/packages/raja/package.py | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index 18d21359910..7d019821cf5 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -29,6 +29,34 @@ class Raja(CMakePackage): """RAJA Parallel Framework.""" homepage = "http://software.llnl.gov/RAJA/" - version('develop', git='https://github.com/LLNL/RAJA.git', branch="master", submodules="True") + version('master', git='https://github.com/LLNL/RAJA.git', branch='master', submodules='True') + version('develop', git='https://github.com/LLNL/RAJA.git', branch='develop', submodules='True') + version('0.5.3', git='https://github.com/LLNL/RAJA.git', tag='v0.5.3', submodules="True") + version('0.5.2', git='https://github.com/LLNL/RAJA.git', tag='v0.5.2', submodules="True") + version('0.5.1', git='https://github.com/LLNL/RAJA.git', tag='v0.5.1', submodules="True") + version('0.5.0', git='https://github.com/LLNL/RAJA.git', tag='v0.5.0', submodules="True") + version('0.4.1', git='https://github.com/LLNL/RAJA.git', tag='v0.4.1', submodules="True") + version('0.4.0', git='https://github.com/LLNL/RAJA.git', tag='v0.4.0', submodules="True") + + variant('cuda', default=False, description='Build with CUDA backend') + variant('openmp', default=True, description='Build OpenMP backend') + + depends_on('cuda', when='+cuda') depends_on('cmake@3.3:', type='build') + + def cmake_args(self): + spec = self.spec + + options = [] + + if '+openmp' in spec: + options.extend([ + '-DENABLE_OPENMP=On']) + + if '+cuda' in spec: + options.extend([ + '-DENABLE_CUDA=On', + '-DCUDA_TOOLKIT_ROOT_DIR=%s' % (spec['cuda'].prefix)]) + + return options