From e7fbd6c53ed97ab838ab149607a39d30e5bde9c5 Mon Sep 17 00:00:00 2001 From: RĂ©mi Lacroix Date: Thu, 30 Jul 2020 05:17:32 +0200 Subject: CMake: Fix compilation with Intel compilers on some systems. (#17693) Systems with older GNU compilers were not affected. This commit fixes #15901 and fixes #17605. --- .../repos/builtin/packages/cmake/intel-cxx-bootstrap.patch | 11 +++++++++++ var/spack/repos/builtin/packages/cmake/package.py | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cmake/intel-cxx-bootstrap.patch diff --git a/var/spack/repos/builtin/packages/cmake/intel-cxx-bootstrap.patch b/var/spack/repos/builtin/packages/cmake/intel-cxx-bootstrap.patch new file mode 100644 index 0000000000..d5475b2e54 --- /dev/null +++ b/var/spack/repos/builtin/packages/cmake/intel-cxx-bootstrap.patch @@ -0,0 +1,11 @@ +--- a/bootstrap 2020-07-24 11:02:56.488414260 +0200 ++++ b/bootstrap 2020-07-24 11:03:20.763775094 +0200 +@@ -1179,7 +1179,7 @@ + } + #endif + +-#if (__cplusplus >= 201703L || defined(__INTEL_COMPILER) && defined(__cpp_if_constexpr)) ++#if (__cplusplus >= 201703L || defined(__INTEL_COMPILER) && defined(__cpp_deduction_guides)) + #include + template ::type = nullptr> diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 07e933c718..c85df79878 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -136,6 +136,10 @@ class Cmake(Package): # https://gitlab.kitware.com/cmake/cmake/issues/16226 patch('intel-c-gnu11.patch', when='@3.6.0:3.6.1') + # Cannot build with Intel again, should be fixed in 3.17.4 and 3.18.1 + # https://gitlab.kitware.com/cmake/cmake/-/issues/21013 + patch('intel-cxx-bootstrap.patch', when='@3.17.0:3.17.3,3.18.0') + # https://gitlab.kitware.com/cmake/cmake/issues/18232 patch('nag-response-files.patch', when='@3.7:3.12') -- cgit v1.2.3-70-g09d2