summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Oxberry <goxberry@gmail.com>2019-08-27 05:00:40 -0700
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2019-08-27 14:00:40 +0200
commit4b767b83a9d742483a9ef788c835aea4357e79c4 (patch)
tree65e65d1a0c5b1de0e27ffca3211312ba32a5f1ec
parent59486ad072e96fcdb4f1dcda2f52de1d5b8f5921 (diff)
downloadspack-4b767b83a9d742483a9ef788c835aea4357e79c4.tar.gz
spack-4b767b83a9d742483a9ef788c835aea4357e79c4.tar.bz2
spack-4b767b83a9d742483a9ef788c835aea4357e79c4.tar.xz
spack-4b767b83a9d742483a9ef788c835aea4357e79c4.zip
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.
-rw-r--r--var/spack/repos/builtin/packages/raja/package.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py
index 9ccd80f11f..4eb7dcbd1e 100644
--- a/var/spack/repos/builtin/packages/raja/package.py
+++ b/var/spack/repos/builtin/packages/raja/package.py
@@ -36,10 +36,8 @@ class Raja(CMakePackage):
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([