summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch23
-rw-r--r--var/spack/repos/builtin/packages/cmake/package.py4
2 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch b/var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch
new file mode 100644
index 0000000000..afe6f871ec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cmake/intel-c-gnu11.patch
@@ -0,0 +1,23 @@
+diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake
+index eb9602a..edca154 100644
+--- a/Modules/Compiler/Intel-C.cmake
++++ b/Modules/Compiler/Intel-C.cmake
+@@ -16,14 +16,14 @@ endif()
+
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0)
+ set(CMAKE_C11_STANDARD_COMPILE_OPTION "${_std}=c11")
+- set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=c11")
++ set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=gnu11")
+ endif()
+
+-if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1)
++if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
+ set(CMAKE_C90_STANDARD_COMPILE_OPTION "${_std}=c89")
+- set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=c89")
++ set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=gnu89")
+ set(CMAKE_C99_STANDARD_COMPILE_OPTION "${_std}=c99")
+- set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=c99")
++ set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=gnu99")
+ endif()
+
+ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1)
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py
index d8b4eefff4..4e2c37993c 100644
--- a/var/spack/repos/builtin/packages/cmake/package.py
+++ b/var/spack/repos/builtin/packages/cmake/package.py
@@ -67,6 +67,10 @@ class Cmake(Package):
depends_on('openssl', when='+openssl')
depends_on('ncurses', when='+ncurses')
+ # Cannot build with Intel, should be fixed in 3.6.2
+ # https://gitlab.kitware.com/cmake/cmake/issues/16226
+ patch('intel-c-gnu11.patch', when='@3.6.0:3.6.1')
+
def url_for_version(self, version):
"""Handle CMake's version-based custom URLs."""
return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (