fix[build]: fix build failure with CMake 4.0

See:
https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html

> Changed in version 4.0: Compatibility with versions of CMake older than
3.5 is removed. Calls to cmake_minimum_required(VERSION) or
cmake_policy(VERSION) that do not specify at least 3.5 as their policy
version (optionally via ...<max>) will produce an error in CMake 4.0 and
above.

Change-Id: I0f920e259e7bf2354e1b475df2cf6f60e41aa681
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
This commit is contained in:
Johnson Ding 2025-03-28 14:57:13 +08:00 committed by Herman Chen
parent ae4d4378e8
commit 5d7a5cb7c5
3 changed files with 1 additions and 6 deletions

View file

@ -6,6 +6,7 @@
# ----------------------------------------------------------------------------
# vim: syntax=cmake
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
if(NOT CMAKE_BUILD_TYPE)
# default to Release build for GCC builds
set(CMAKE_BUILD_TYPE Debug CACHE STRING

View file

@ -1,6 +1,3 @@
cmake_minimum_required( VERSION 2.6.3 )
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_C_COMPILER "${TOOLCHAIN}gcc")
SET(CMAKE_CXX_COMPILER "${TOOLCHAIN}g++")

View file

@ -1,6 +1,3 @@
cmake_minimum_required( VERSION 2.6.3 )
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_C_COMPILER "${TOOLCHAIN}gcc")
SET(CMAKE_CXX_COMPILER "${TOOLCHAIN}g++")