Fix building on CentOS 9

`CMAKE_POLICY(SET CMP0148 OLD)` fails on CMake < 3.27, when CMP0148 was
introduced. Centos 9 Stream is still on CMake 3.26.

On CMake >= 3.27, this change adds back a warning that "Policy CMP0148
is not set".

[1] https://cmake.org/cmake/help/latest/command/cmake_policy.html#setting-policies-by-cmake-version
This commit is contained in:
Evan Goode 2025-04-08 12:38:12 +00:00 committed by Petr Pisar
parent 4b92ef06f6
commit 6e0718ff98
1 changed files with 0 additions and 1 deletions

View File

@ -1,5 +1,4 @@
CMAKE_MINIMUM_REQUIRED (VERSION 3.5.0)
CMAKE_POLICY(SET CMP0148 OLD)
PROJECT (dnf NONE)
INCLUDE (${CMAKE_SOURCE_DIR}/VERSION.cmake)