Skip to content

Commit 077cdca

Browse files
daichifukuijohnbartholomew
authored andcommitted
Fixes build on CMake 4
This patch resolves an issue where the project fails to build with newer versions of CMake, specifically CMake 4.0, which has removed backward compatibility with versions older than 3.5. The bug was originally reported on the Debian issue tracker at #1113063: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1113063 The project's CMakeLists.txt and CMakeLists.txt.in files specify a cmake_minimum_required version of 2.8.7...4.0. This causes the build process to terminate with a fatal error on CMake 4.0 or later. The fix updates the required minimum version to 3.5...4.1 to align with the latest CMake policies and allow the project to build successfully. This change will be beneficial not only for Debian but for all other Linux distributions and operating systems running a modern CMake version. Signed-off-by: Fukui Daichi <[email protected]>
1 parent 3cb4157 commit 077cdca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 2.8.7...4.0)
1+
cmake_minimum_required(VERSION 3.5...4.1)
22
project(jsonnet C CXX)
33

44
include(ExternalProject)

CMakeLists.txt.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CMake script run a generation-time. This must be separate from the main
22
# CMakeLists.txt file to allow downloading and building googletest at generation
33
# time.
4-
cmake_minimum_required(VERSION 2.8.2...4.0)
4+
cmake_minimum_required(VERSION 3.5...4.1)
55

66
project(googletest-download NONE)
77

0 commit comments

Comments
 (0)