raja~openmp: explicitly disable OpenMP in CMake (#12572)

Before this commit, CMake would still attempt to detect OpenMP, even
if RAJA were being installed with `spack install raja~openmp`, because
the option `ENABLE_OPENMP` is set to "On" by default. This commit
explicitly disables OpenMP when the Spack install spec contains
'~openmp`, ensuring that CMake does not attempt to detect and link
with OpenMP.
This commit is contained in:
Geoffrey Oxberry 2019-08-27 05:00:40 -07:00 committed by Massimiliano Culpo
parent 59486ad072
commit 4b767b83a9

View file

@ -36,10 +36,8 @@ def cmake_args(self):
spec = self.spec spec = self.spec
options = [] options = []
options.append('-DENABLE_OPENMP={0}'.format(
if '+openmp' in spec: 'On' if '+openmp' in spec else 'Off'))
options.extend([
'-DENABLE_OPENMP=On'])
if '+cuda' in spec: if '+cuda' in spec:
options.extend([ options.extend([