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:
parent
59486ad072
commit
4b767b83a9
1 changed files with 2 additions and 4 deletions
|
@ -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([
|
||||
|
|
Loading…
Reference in a new issue