diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index a5fb14db915..a625817c850 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -312,6 +312,13 @@ def bootstrap_args(self): 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