CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions.
时间: 2024-02-27 07:56:34 浏览: 927
这个警告是由于你的 CMakeLists.txt 文件中使用了旧版本的 CMake 的语法,而这个语法在未来的版本中将被移除。为了解决这个问题,你需要升级到 CMake 2.8.12 或更新的版本,或者在 cmake_minimum_required 命令的 VERSION 参数中指定一个较高的值,以告诉 CMake 你的项目不需要与旧版本兼容。例如,你可以将命令修改为:
```
cmake_minimum_required(VERSION 3.0)
```
这将指定你的项目需要 CMake 3.0 或更高版本。
相关问题
-- cmake version 3.22.1 CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to te
ll CMake the minimum required version for your project. For example, if you want to set the minimum required version to 3.22.1, you can modify your `CMakeLists.txt` file as follows:
```cmake
cmake_minimum_required(VERSION 3.22.1)
```
By specifying the minimum required version, you ensure that your project is compatible with that version or any higher versions of CMake. This warning is to inform you that compatibility with CMake versions older than 2.8.12 will be removed in the future.
CMake Deprecation Warning at CMakeLists.txt:27 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. -- Detected nanomsg ABI v5.0.0 CMake Warning at CMakeLists.txt:242 (message): Could not find asciidoctor: skipping docs
这段信息来自一个 CMakeLists.txt 文件,它包含了 CMake 构建系统所需的一些配置信息。其中第一行是一个警告,它提示你的 CMake 版本过低,建议你更新到 2.8.12 或更高的版本。第二行是一个检测结果,它告诉你当前系统上已经安装了 nanomsg 库的 ABI 版本为 5.0.0。第三行是一个警告,它告诉你在当前系统上找不到 asciidoctor 工具,因此无法生成相关文档。
阅读全文