cmake-3.22.2

Fixes rhbz#2045074
This commit is contained in:
Björn Esser 2022-01-25 17:10:43 +01:00
parent e4e979aedd
commit b707c6805c
No known key found for this signature in database
GPG Key ID: F52E98007594C21D
8 changed files with 7 additions and 369 deletions

View File

@ -1,53 +0,0 @@
From 376486c942ab4afc27150d938c1482c1d0000c42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
Date: Tue, 7 Dec 2021 13:34:24 +0100
Subject: [PATCH] Add support for Python 3.11
---
Modules/FindPython/Support.cmake | 2 +-
Modules/FindPythonInterp.cmake | 2 +-
Modules/FindPythonLibs.cmake | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index ce25cfc7..b7a0ef6b 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -22,7 +22,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
message (FATAL_ERROR "FindPython: INTERNAL ERROR")
endif()
if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "3")
- set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+ set(_${_PYTHON_PREFIX}_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "2")
set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
else()
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index efe0f119..4fc40c89 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -54,7 +54,7 @@ unset(_Python_NAMES)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
-set(_PYTHON3_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+set(_PYTHON3_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
if(PythonInterp_FIND_VERSION)
if(PythonInterp_FIND_VERSION_COUNT GREATER 1)
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 396f0d2e..c0caf347 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -79,7 +79,7 @@ set(CMAKE_FIND_FRAMEWORK LAST)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
-set(_PYTHON3_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+set(_PYTHON3_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
if(PythonLibs_FIND_VERSION)
if(PythonLibs_FIND_VERSION_COUNT GREATER 1)
--
2.33.1

View File

@ -1,74 +0,0 @@
From d176ff71c03f62d993d2fbad6aa416e64e336453 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Wed, 15 Dec 2021 10:16:59 -0500
Subject: [PATCH 3/3] FindBoost: Add support for Boost 1.78
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Update the list of known versions.
Run the command
cmake -DBOOST_DIR=/path/to/boost_1_78_0 \
-P Utilities/Scripts/BoostScanDeps.cmake
to extract dependencies from the 1.78.0 source tree.
The dependencies differ from those of 1.77:
* The `log` component no longer depends on `date_time`.
Fixes: #23016
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
---
Modules/FindBoost.cmake | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 38faca24aa..0ad342f0e6 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1350,7 +1350,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
set(_Boost_TIMER_DEPENDENCIES chrono)
set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic)
set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
- else()
+ elseif(Boost_VERSION_STRING VERSION_LESS 1.78.0)
set(_Boost_CONTRACT_DEPENDENCIES thread chrono)
set(_Boost_COROUTINE_DEPENDENCIES context)
set(_Boost_FIBER_DEPENDENCIES context)
@@ -1365,6 +1365,21 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
set(_Boost_TIMER_DEPENDENCIES chrono)
set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono atomic)
set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ else()
+ set(_Boost_CONTRACT_DEPENDENCIES thread chrono)
+ set(_Boost_COROUTINE_DEPENDENCIES context)
+ set(_Boost_FIBER_DEPENDENCIES context)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_JSON_DEPENDENCIES container)
+ set(_Boost_LOG_DEPENDENCIES log_setup filesystem thread regex chrono atomic)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
+ set(_Boost_THREAD_DEPENDENCIES chrono atomic)
+ set(_Boost_TIMER_DEPENDENCIES chrono)
+ set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.78.0 AND NOT Boost_NO_WARN_NEW_VERSIONS)
message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
endif()
@@ -1638,7 +1653,7 @@ else()
# _Boost_COMPONENT_HEADERS. See the instructions at the top of
# _Boost_COMPONENT_DEPENDENCIES.
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
- "1.77.0" "1.77" "1.76.0" "1.76" "1.75.0" "1.75" "1.74.0" "1.74"
+ "1.78.0" "1.78" "1.77.0" "1.77" "1.76.0" "1.76" "1.75.0" "1.75" "1.74.0" "1.74"
"1.73.0" "1.73" "1.72.0" "1.72" "1.71.0" "1.71" "1.70.0" "1.70" "1.69.0" "1.69"
"1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
"1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
--
2.33.1

View File

@ -1,78 +0,0 @@
From d4bb6c0c7fe8e3ee5aaa275cf939d074f959119b Mon Sep 17 00:00:00 2001
From: Oleg Sidorkin <osidorkin@gmail.com>
Date: Thu, 16 Dec 2021 21:24:00 +0300
Subject: [PATCH 6/6] FindBoost: Add support for Python 3.10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Regexps in FindBoost assumed that python's minor version had only one
digit. That became not true for 3.10.
Fixes: #23025
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
---
Modules/FindBoost.cmake | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 0ad342f0e6..75cbbf56bc 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -390,7 +390,7 @@ cmake_policy(SET CMP0102 NEW) # if mark_as_advanced(non_cache_var)
function(_boost_get_existing_target component target_var)
set(names "${component}")
- if(component MATCHES "^([a-z_]*)(python|numpy)([1-9])\\.?([0-9])?$")
+ if(component MATCHES "^([a-z_]*)(python|numpy)([1-9])\\.?([0-9]+)?$")
# handle pythonXY and numpyXY versioned components and also python X.Y, mpi_python etc.
list(APPEND names
"${CMAKE_MATCH_1}${CMAKE_MATCH_2}" # python
@@ -407,7 +407,7 @@ function(_boost_get_existing_target component target_var)
if(TARGET "${prefix}::${name}")
# The target may be an INTERFACE library that wraps around a single other
# target for compatibility. Unwrap this layer so we can extract real info.
- if("${name}" MATCHES "^(python|numpy|mpi_python)([1-9])([0-9])$")
+ if("${name}" MATCHES "^(python|numpy|mpi_python)([1-9])([0-9]+)$")
set(name_nv "${CMAKE_MATCH_1}")
if(TARGET "${prefix}::${name_nv}")
get_property(type TARGET "${prefix}::${name}" PROPERTY TYPE)
@@ -430,7 +430,7 @@ endfunction()
function(_boost_get_canonical_target_name component target_var)
string(TOLOWER "${component}" component)
- if(component MATCHES "^([a-z_]*)(python|numpy)([1-9])\\.?([0-9])?$")
+ if(component MATCHES "^([a-z_]*)(python|numpy)([1-9])\\.?([0-9]+)?$")
# handle pythonXY and numpyXY versioned components and also python X.Y, mpi_python etc.
set(${target_var} "Boost::${CMAKE_MATCH_1}${CMAKE_MATCH_2}" PARENT_SCOPE)
else()
@@ -1004,7 +1004,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
# against the new release.
# Handle Python version suffixes
- if(component MATCHES "^(python|mpi_python|numpy)([0-9][0-9]?|[0-9]\\.[0-9])\$")
+ if(component MATCHES "^(python|mpi_python|numpy)([0-9][0-9]?|[0-9]\\.[0-9]+)\$")
set(component "${CMAKE_MATCH_1}")
set(component_python_version "${CMAKE_MATCH_2}")
endif()
@@ -1408,7 +1408,7 @@ endfunction()
#
function(_Boost_COMPONENT_HEADERS component _hdrs)
# Handle Python version suffixes
- if(component MATCHES "^(python|mpi_python|numpy)([0-9][0-9]?|[0-9]\\.[0-9])\$")
+ if(component MATCHES "^(python|mpi_python|numpy)([0-9]+|[0-9]\\.[0-9]+)\$")
set(component "${CMAKE_MATCH_1}")
set(component_python_version "${CMAKE_MATCH_2}")
endif()
@@ -2165,7 +2165,7 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
if(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\$")
set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
- elseif(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\\.?([0-9])\$")
+ elseif(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\\.?([0-9]+)\$")
set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
set(COMPONENT_PYTHON_VERSION_MINOR "${CMAKE_MATCH_3}")
--
2.33.1

View File

@ -1,33 +0,0 @@
From d45667d45943e1b768b25921f8e481cfafa487a4 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Mon, 20 Dec 2021 09:03:05 -0500
Subject: [PATCH 8/9] FindBoost: Do not warn about now-supported version 1.78
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In commit d176ff71c0 (FindBoost: Add support for Boost 1.78, 2021-12-15)
we forgot to update the future-version check.
Issue: #23016
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
---
Modules/FindBoost.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 75cbbf56bc..c3142d66aa 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1380,7 +1380,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
set(_Boost_TIMER_DEPENDENCIES chrono)
set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono atomic)
set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
- if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.78.0 AND NOT Boost_NO_WARN_NEW_VERSIONS)
+ if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.79.0 AND NOT Boost_NO_WARN_NEW_VERSIONS)
message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
endif()
endif()
--
2.33.1

View File

@ -1,54 +0,0 @@
From ae6b25d920325585f0e7f56d23d2b0f8e0b39af8 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Fri, 17 Dec 2021 12:59:51 -0500
Subject: [PATCH 7/9] FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in
pkg-config code path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if
available, 2021-06-11, v3.22.0-rc1~469^2) we return early if pkg-config
provides the information. During review of that commit, code to
populate the legacy `GLUT_INCLUDE_DIR` result variable was removed from
that code path. Add code to provide it.
Also fix the test case to use `GLUT_INCLUDE_DIR`, the result variable
documented officially by the module.
Fixes: #23018
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
---
Modules/FindGLUT.cmake | 2 ++
Tests/FindGLUT/Test/CMakeLists.txt | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index dd0975d395..636f1ea3b1 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -71,6 +71,8 @@ find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(GLUT glut)
if(GLUT_FOUND)
+ # In the non-pkg-config code path we only provide GLUT_INCLUDE_DIR.
+ set(GLUT_INCLUDE_DIR "${GLUT_INCLUDE_DIRS}")
_add_glut_target_simple()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLUT REQUIRED_VARS GLUT_FOUND)
return()
diff --git a/Tests/FindGLUT/Test/CMakeLists.txt b/Tests/FindGLUT/Test/CMakeLists.txt
index 0f4e536739..f6440b250f 100644
--- a/Tests/FindGLUT/Test/CMakeLists.txt
+++ b/Tests/FindGLUT/Test/CMakeLists.txt
@@ -9,7 +9,7 @@ target_link_libraries(testglut_tgt GLUT::GLUT)
add_test(NAME testglut_tgt COMMAND testglut_tgt)
add_executable(testglut_var main.c)
-target_include_directories(testglut_var PRIVATE ${GLUT_INCLUDE_DIRS})
+target_include_directories(testglut_var PRIVATE ${GLUT_INCLUDE_DIR})
target_link_libraries(testglut_var PRIVATE ${GLUT_LIBRARIES})
add_test(NAME testglut_var COMMAND testglut_var)
--
2.33.1

View File

@ -1,55 +0,0 @@
From 6a0ce19ce1cb594cdec19bacc9fc7a38156e38da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Jan 2022 17:26:14 +0100
Subject: [PATCH] FortranCInterface: Fix compatibility with GCC gfortran 12 LTO
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since version 12.0 the GCC Fortran compiler has implemented "WG5/N1942",
which causes, if link-time opmization is enabled, obfuscation of hard-coded
string values in the compiler objects and its resulting ELF-binaries.
This causes the CMake-internal detection of the mangling scheme for the
naming of subroutines to fail. Thus we must ensure to have any link-time
optimization features to be disabled on the executable file we perform the
detection on.
The static libraries, however, must be build with LTO and non-LTO objects,
as that will ensure the verify step will operate on IPO objects, if building
those is requested by the system compiler flags.
Fixes: #23123
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
---
Modules/FortranCInterface/CMakeLists.txt | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Modules/FortranCInterface/CMakeLists.txt b/Modules/FortranCInterface/CMakeLists.txt
index 13e4498ad9..ce0bc10c8e 100644
--- a/Modules/FortranCInterface/CMakeLists.txt
+++ b/Modules/FortranCInterface/CMakeLists.txt
@@ -102,6 +102,19 @@ set_property(TARGET symbols PROPERTY POSITION_INDEPENDENT_CODE 1)
add_executable(FortranCInterface main.F call_sub.f ${call_mod})
target_link_libraries(FortranCInterface PUBLIC symbols)
+# If IPO is enabled here, GCC gfortran >= 12.0 will obfuscate
+# the strings of the return values in the compiled executable,
+# which we use to regex match against later.
+# The static libraries must be build with IPO and non-IPO objects,
+# as that will ensure the verify step will operate on IPO objects,
+# if requested by the system compiler flags.
+if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND
+ CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
+ target_compile_options(FortranCInterface PRIVATE "-fno-lto")
+ target_compile_options(myfort PRIVATE "-flto=auto" "-ffat-lto-objects")
+ target_compile_options(symbols PRIVATE "-flto=auto" "-ffat-lto-objects")
+endif()
+
file(GENERATE OUTPUT exe-$<CONFIG>.cmake CONTENT [[
set(FortranCInterface_EXE "$<TARGET_FILE:FortranCInterface>")
]])
--
2.34.1

View File

@ -68,14 +68,14 @@
%{?rcsuf:%global versuf -%{rcsuf}}
# For handling bump release by rpmdev-bumpspec and mass rebuild
%global baserelease 7
%global baserelease 1
# Uncomment if building for EPEL
#global name_suffix %%{major_version}
%global orig_name cmake
Name: %{orig_name}%{?name_suffix}
Version: %{major_version}.%{minor_version}.1
Version: %{major_version}.%{minor_version}.2
Release: %{baserelease}%{?relsuf}%{?dist}
Summary: Cross-platform make system
@ -109,25 +109,6 @@ Patch101: %{name}-fedora-flag_release.patch
# Add dl to CMAKE_DL_LIBS on MINGW
# https://gitlab.kitware.com/cmake/cmake/issues/17600
Patch102: %{name}-mingw-dl.patch
# Add support for Python 3.11 (merged in upstream)
# https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6792
Patch103: 0003-Add-support-for-Python-3.11.patch
# Add support for Boost 1.78 (merged in upstream)
# https://gitlab.kitware.com/cmake/cmake/-/issues/23016
Patch104: 0004-FindBoost-Add-support-for-Boost-1.78.patch
# FindBoost: Add support for Python >= 3.10 (merged in upstream)
# https://gitlab.kitware.com/cmake/cmake/-/issues/23025
Patch105: 0005-FindBoost-Add-support-for-Python-3.10.patch
# FindBoost: Do not warn about now-supported version 1.78 (merged in upstream)
# https://gitlab.kitware.com/cmake/cmake/-/issues/23016
Patch106: 0006-FindBoost-Do-not-warn-about-now-supported-version-1..patch
# FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in pkg-config code path (merged in upstream)
# https://gitlab.kitware.com/cmake/cmake/-/issues/23018
Patch107: 0007-FindGLUT-Provide-legacy-GLUT_INCLUDE_DIR-result-in-p.patch
# FortranCInterface: Fix compatibility with GCC gfortran 12 LTO (proposed PR upstream)
# https://bugzilla.redhat.com/show_bug.cgi?id=2041904
# https://gitlab.kitware.com/cmake/cmake/-/issues/23123
Patch108: 0008-FortranCInterface-Fix-compatibility-with-GCC-gfortra.patch
# Patch for renaming on EPEL
%if 0%{?name_suffix:1}
@ -548,6 +529,10 @@ popd
%changelog
* Tue Jan 25 2022 Björn Esser <besser82@fedoraproject.org> - 3.22.2-1
- cmake-3.22.2
Fixes rhbz#2045074
* Thu Jan 20 2022 Björn Esser <besser82@fedoraproject.org> - 3.22.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (cmake-3.22.1.tar.gz) = b1e900fe573cd1cc76d26386f2298d7722737c9ff67930ee108994972b4561ef69caeb537177c9b95b7f17b755e20e034825d3807ea0d2dd4c391310b03adc11
SHA512 (cmake-3.22.2.tar.gz) = 86e95f9ce773bcc7513a1c3901561a1b09d06830936b8b1d44e075fe3bac55cfa636eccdedfa94a9939f5e12eb965224559fac30a17c64314ee023acb2a3e53f