Skip to content

Conversation

@myd7349
Copy link
Contributor

@myd7349 myd7349 commented Apr 8, 2025

在 CMake 3.27+ 中,项目指定低于 3.5 的 CMake 版本会触发警告。
在 CMake 4.0 中,项目指定低于 3.10 的 CMake 版本会触发警告。

目前,GitHub Actions 中的 CMake 版本较新,在使用 CMake 3.5 的时候会触发一条警告:

图片

本 PR 按照 CMake 警告中提示的做法对 CMake 版本进行调整,在保留了对老版本 CMake 支持的同时,消除这条警告。

@myd7349 myd7349 force-pushed the fix-cmake-warning branch from 6877312 to 81f0f3d Compare April 8, 2025 15:30
@skywind3000
Copy link
Owner

直接写成 3.10 不行么?

@myd7349 myd7349 force-pushed the fix-cmake-warning branch from 81f0f3d to 524fb14 Compare April 9, 2025 04:31
@myd7349
Copy link
Contributor Author

myd7349 commented Apr 9, 2025

直接写成 3.10 不行么?

也可以。不过这样就要求用户使用 CMake 3.10+ 了。

min...max 这种是老版本依然能用,新版本也能用,新老版本兼顾。

不过 3.10 也发布很久了,直接改成 3.10 也简单。

@myd7349 myd7349 force-pushed the fix-cmake-warning branch from 524fb14 to 1e65e0f Compare April 9, 2025 05:03
@skywind3000 skywind3000 merged commit 7ae0f2c into skywind3000:master Apr 9, 2025
9 checks passed
@skywind3000
Copy link
Owner

thx

@myd7349 myd7349 deleted the fix-cmake-warning branch April 9, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants