summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Sachs <stephenmsachs@gmail.com>2023-01-05 18:13:26 +0100
committerGitHub <noreply@github.com>2023-01-05 18:13:26 +0100
commitada174afbd4bb3498259a167c424da7214fb4a79 (patch)
tree54678a985c0ba1b1a382ccd7293b025af17cef40
parenteace2ebb08c9da7954ae09a4b8aefc72d695eff1 (diff)
downloadspack-ada174afbd4bb3498259a167c424da7214fb4a79.tar.gz
spack-ada174afbd4bb3498259a167c424da7214fb4a79.tar.bz2
spack-ada174afbd4bb3498259a167c424da7214fb4a79.tar.xz
spack-ada174afbd4bb3498259a167c424da7214fb4a79.zip
cmake fails with icpc warning (#34774)
The Intel compiler isn't able to deal with noinline member functions of template classses defined in headers. As such it outputs ``` warning #2196: routine is both "inline" and "noinline" ``` cmake bootstrap will fail due to the word 'warning'. See spack/var/spack/repos/builtin/packages/protobuf/intel-v2.patch for reference. The issue does not appear with intel@2021.7.0 or later: ``` $~: compiler=/shared/spack/opt/spack/linux-amzn2-x86_64_v3/gcc-12.2.0/intel-oneapi-compilers-2022.2.0-uqvb2553zy5toeapvoopacndd27x6p5m/compiler/2022.2.0/linux/bin/intel64/icpc $~: $compiler unique.c icpc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message. ``` This is a clean version of https://github.com/spack/spack/pull/34167 Co-authored-by: Stephen Sachs <stesachs@amazon.com>
-rw-r--r--var/spack/repos/builtin/packages/cmake/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py
index a5fb14db91..a625817c85 100644
--- a/var/spack/repos/builtin/packages/cmake/package.py
+++ b/var/spack/repos/builtin/packages/cmake/package.py
@@ -312,6 +312,13 @@ class Cmake(Package):
args = []
self.generator = make
+ # The Intel compiler isn't able to deal with noinline member functions of
+ # template classes defined in headers. As such it outputs
+ # warning #2196: routine is both "inline" and "noinline"
+ # cmake bootstrap will fail due to the word 'warning'.
+ if spec.satisfies("%intel@:2021.6.0"):
+ args.append("CXXFLAGS=-diag-disable=2196")
+
if self.spec.satisfies("platform=windows"):
args.append("-GNinja")
self.generator = ninja