summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTiziano Müller <tiziano.mueller@hpe.com>2022-05-19 11:38:00 +0200
committerGitHub <noreply@github.com>2022-05-19 11:38:00 +0200
commitf5250da611ec2639d9e99d0f1a335cfe996090a3 (patch)
tree5ccc42584989a14f9599cae6e49f33860d76b419 /var
parentc2af154cd24ab3ef501a7efc020f818ef60aa552 (diff)
downloadspack-f5250da611ec2639d9e99d0f1a335cfe996090a3.tar.gz
spack-f5250da611ec2639d9e99d0f1a335cfe996090a3.tar.bz2
spack-f5250da611ec2639d9e99d0f1a335cfe996090a3.tar.xz
spack-f5250da611ec2639d9e99d0f1a335cfe996090a3.zip
cp2k: fix unbound var use without cuda (#30736)
fixes #30631
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/cp2k/package.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py
index 523d9055e0..24765bfe67 100644
--- a/var/spack/repos/builtin/packages/cp2k/package.py
+++ b/var/spack/repos/builtin/packages/cp2k/package.py
@@ -661,7 +661,8 @@ class Cp2k(MakefilePackage, CudaPackage):
mkf.write(fflags('CPPFLAGS', cppflags))
mkf.write(fflags('CFLAGS', cflags))
mkf.write(fflags('CXXFLAGS', cxxflags))
- mkf.write(fflags(acc_flags_var, nvflags))
+ if '+cuda' in spec:
+ mkf.write(fflags(acc_flags_var, nvflags))
mkf.write(fflags('FCFLAGS', fcflags))
mkf.write(fflags('LDFLAGS', ldflags))
mkf.write(fflags('LIBS', libs))