-- 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
时间: 2024-04-12 22:30:47 浏览: 1080
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 工具,因此无法生成相关文档。
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.
这个警告是因为你的`CMakeLists.txt`文件中设置了`cmake_minimum_required`的版本过低,建议将其更新至CMake 2.8.12或更高版本,以避免兼容性问题。你可以将`cmake_minimum_required`设置为如下所示的语句:
```
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
```
这样可以明确告诉CMake,你的项目需要的最低版本是2.8.12,如果使用低于此版本的CMake编译,则会出现错误。如果你确定你的项目不需要向下兼容旧版本的CMake,可以将`cmake_minimum_required`替换为如下所示的语句:
```
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
```
这样可以确保你的项目不会与CMake 3.0以下的版本兼容。更新后,再次编译项目即可。
阅读全文
相关推荐















