diff --git a/cmake.spec b/cmake.spec index 1615d510c95075fd22152db17ff5c134566a5318..c4203355109762b215ba61a69d4f9f4d0fefe25e 100644 --- a/cmake.spec +++ b/cmake.spec @@ -11,7 +11,7 @@ Name: cmake Version: 3.24.3 -Release: 1 +Release: 2 Summary: Cross-platform make system License: BSD and MIT and zlib URL: http://www.cmake.org @@ -27,6 +27,7 @@ Patch2: cmake-mingw-dl.patch %ifarch sw_64 Patch3: cmake-3.22.0-sw.patch %endif +Patch4: fix-clang.patch BuildRequires: coreutils findutils gcc-c++ gcc-gfortran sed BuildRequires: emacs python3-devel pkgconfig(Qt5Widgets) desktop-file-utils @@ -238,6 +239,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %exclude %{_pkgdocdir}/Copyright.txt %changelog +* Thu May 18 2023 yoo - 3.24.3-2 +- fix clang build error + * Mon Nov 14 2022 jchzhou - 3.24.3-1 - Update to 3.24.3 diff --git a/fix-clang.patch b/fix-clang.patch new file mode 100644 index 0000000000000000000000000000000000000000..45ff9fcd6479bad1a714ead26657e668e6bad2b9 --- /dev/null +++ b/fix-clang.patch @@ -0,0 +1,14 @@ +diff -u -r cmake-3.24.3/Source/Checks/cm_cxx_features.cmake cmake-3.24.3/Source/Checks/cm_cxx_features.cmake +--- cmake-3.24.3/Source/Checks/cm_cxx_features.cmake 2022-11-01 22:55:49.000000000 +0800 ++++ cmake-3.24.3/Source/Checks/cm_cxx_features.cmake 2023-05-17 22:50:35.000000000 +0800 +@@ -76,8 +76,8 @@ + endfunction() + + cm_check_cxx_feature(make_unique) +-if(CMake_HAVE_CXX_MAKE_UNIQUE) +- set(CMake_HAVE_CXX_UNIQUE_PTR 1) ++if(CMake_HAVE_CXX_MAKE_UNIQUE OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)) ++ set(CMake_HAVE_CXX_UNIQUE_PTR 1) + endif() + cm_check_cxx_feature(unique_ptr) + if (NOT CMAKE_CXX_STANDARD LESS "17")