diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index 18d2135991..7d019821cf 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