summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMosè Giordano <giordano@users.noreply.github.com>2023-02-16 16:45:06 +0000
committerGitHub <noreply@github.com>2023-02-16 17:45:06 +0100
commit5079086019a6529fe5de0f62eddaa3b870226d2c (patch)
treec38747df44003b8af38f286d777378a8be3ad167 /var
parentbfe06f694c5b9a32f435deba109037ef8e3d21bc (diff)
downloadspack-5079086019a6529fe5de0f62eddaa3b870226d2c.tar.gz
spack-5079086019a6529fe5de0f62eddaa3b870226d2c.tar.bz2
spack-5079086019a6529fe5de0f62eddaa3b870226d2c.tar.xz
spack-5079086019a6529fe5de0f62eddaa3b870226d2c.zip
cp2k: explicitly use C99 standard (#34957)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/cp2k/package.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py
index 3daff41e5f..43b0d8ecfc 100644
--- a/var/spack/repos/builtin/packages/cp2k/package.py
+++ b/var/spack/repos/builtin/packages/cp2k/package.py
@@ -340,6 +340,10 @@ class Cp2k(MakefilePackage, CudaPackage):
libs = []
gpuver = ""
+ # CP2K Makefile doesn't set C standard, but the source code uses
+ # C99-style for-loops with inline definition of iterating variable.
+ cflags.append(self.compiler.c99_flag)
+
if "%intel" in spec:
cflags.append("-fp-model precise")
cxxflags.append("-fp-model precise")