Bug#1125598: amgcl: FTBFS with CMake 4.2
Santiago Vila
sanvila at debian.org
Fri Jan 16 14:55:15 GMT 2026
On Fri, Jan 16, 2026 at 02:48:00PM +0100, Markus Blatt wrote:
> seems like CMake 4.5 has problems with this line in the topmoset CMakeLists.txt
>
> cmake_minimum_required(VERSION 3.5)
>
> Lazy developers like me usually just keep the minimum version from the star and just
> increase it if needed.
>
> Maybe it is enough to require a newer version. Not sure which one that would be.
>
> Or we just try the proposed workaround od passing -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to cmake
Hi. I'm just the messenger here and not really an expert on CMake.
For this particular package, I would try the attached patch.
It may or it may not work, but at least it passes the configure step.
Regardless of the patch working or not, I would recommend contacting
upstream and tell them about this failure. CMake 4 has been around for
some time now and it seems about time that authors adapt their programs.
Thanks.
-------------- next part --------------
diff -ru amgcl-1.4.4.orig/CMakeLists.txt amgcl-1.4.4/CMakeLists.txt
--- amgcl-1.4.4.orig/CMakeLists.txt 2023-10-27 18:44:15.000000000 +0200
+++ amgcl-1.4.4/CMakeLists.txt 2026-01-16 15:42:05.005756578 +0100
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Build type")
message(STATUS "No build type selected, default to ${CMAKE_BUILD_TYPE}")
@@ -6,9 +6,9 @@
project(AMGCL)
-if (NOT (CMAKE_VERSION LESS 3.3))
- cmake_policy(SET CMP0058 OLD)
-endif()
+# if (NOT (CMAKE_VERSION LESS 3.3))
+# cmake_policy(SET CMP0058 OLD)
+# endif()
set(AMGCL_MASTER_PROJECT OFF)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
More information about the debian-science-maintainers
mailing list