确定适当的版本为cmake_minimum_required() [英] Determine appropriate version for cmake_minimum_required()

查看:1733
本文介绍了确定适当的版本为cmake_minimum_required()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从一组 CMakeLists.txt 文件,如何为 cmake_minimum_required()确定适当的版本号, ?

From a set of CMakeLists.txt files, how can I determine an appropriate version number for cmake_minimum_required()? Is there a better way than being familiar with the history of CMake features and using trial and error?

推荐答案

有一个更好的方法比熟悉CMake特性的历史和使用反复试验=https://cmake.org/documentation/ =nofollow>每版本文档。使用它,您可以检查您的项目中使用的所有功能是否由conrete CMake版本支持。

CMake has per-version documentation on its cite. Using it, you may check that all features you use in your project are supported by conrete CMake version.

功能包括命令名称,命令选项及其可能的值,名称

Features include command names, command options and their possible values, names of modules shipped with CMake.

通常,项目不需要精确最小CMake版本。您可以采取合理的版本,可供用户访问,并检查此版本是否支持您使用的所有功能。

Usually project does not need precise minimum CMake version. You may take reasonable version, which is accessible for users, and check whether this version supports all features you use.

这篇关于确定适当的版本为cmake_minimum_required()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆