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
options = []
if '+openmp' in spec:
options.extend([
'-DENABLE_OPENMP=On'])
options.append('-DENABLE_OPENMP={0}'.format(
'On' if '+openmp' in spec else 'Off'))
if '+cuda' in spec:
options.extend([