You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CMake版本不匹配及执行CMake命令时出现警告的问题求助

CMake版本不匹配及执行CMake命令时出现警告的问题求助

大家好,我现在碰到了一个和CMake、OpenCV相关的问题,想请大家帮忙看看:

  • 背景情况:我想在Java环境下使用OpenCV的LBPH分类器,操作过程中需要用到CMake。官方要求CMake的最低版本是3.29,但我之前安装的是3.22版本,所以已经按照相关教程把CMake升级到符合要求的版本了。
  • 遇到的问题:我尝试执行这条CMake命令:
    cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=/home/alex/opencv_contrib
    结果却出现了两个警告信息:

CMake Warning:
No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases.

CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must contain a project() command.

有没有朋友能帮我分析下这两个警告的原因,以及该怎么解决呢?是不是我在执行命令或者配置的时候哪里出错了?

备注:内容来源于stack exchange,提问作者Al3x4ndru1

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 07:53:14