summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Lacroix <remi.lacroix@idris.fr>2020-07-30 05:17:32 +0200
committerGitHub <noreply@github.com>2020-07-29 22:17:32 -0500
commite7fbd6c53ed97ab838ab149607a39d30e5bde9c5 (patch)
tree906fb3663002fc61b5bdaf8233e1bf3aefaf3b47
parent8e49cac43349db3bb85f5ff534f881a4a4212797 (diff)
downloadspack-e7fbd6c53ed97ab838ab149607a39d30e5bde9c5.tar.gz
spack-e7fbd6c53ed97ab838ab149607a39d30e5bde9c5.tar.bz2
spack-e7fbd6c53ed97ab838ab149607a39d30e5bde9c5.tar.xz
spack-e7fbd6c53ed97ab838ab149607a39d30e5bde9c5.zip
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.
-rw-r--r--var/spack/repos/builtin/packages/cmake/intel-cxx-bootstrap.patch11
-rw-r--r--var/spack/repos/builtin/packages/cmake/package.py4
2 files changed, 15 insertions, 0 deletions
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 <optional>
+ template <typename T,
+ typename std::invoke_result<decltype(&T::get), T>::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')