CMake Error at CMakeLists.txt:24

问题:CMake Error at CMakeLists.txt:24 (add_subdirectory):
add_subdirectory given source "gtest" which is not an existing directory.

解答:

Cmake < 3.11 doesn't support add_library without any source file, but flann CMake use a trick that use an empty string "" as source list (i.e add_library(foo SHARED "")).
The existing flann Cmake code violates the new behavior of add_library() for Cmake>=3.11.
buildroot/buildroot@45a39b3

It turns out in Cmake 3.11, "add_library()" and "add_executable()" commands can be called without any sources and won't complain as long as sources are added later via "target_sources()" command.
https://blog.kitware.com/cmake-3-11-0-available-for-download

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用和引用[2]没有提到cmakelists.txt中的具体错误信息,所以无法为您提供关于cmakelists.txt第176行的具体错误信息的解答。引用中提到了CMake项目解析失败的问题,可能是由于配置错误或生成问题导致的。您可以尝试检查您的CMakeLists.txt文件中第176行的代码,确保代码的正确性。同时,还可以查看其他错误信息或警告信息,以帮助确定问题所在。另外,您还可以检查您的环境配置,确保您安装了所需的依赖库,并且版本符合要求。如果问题仍然存在,您可以尝试搜索相关的错误信息或在开发者社区中寻求帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [【ORB-SLAM3】CMake Error at CMakeLists.txt:37 (message): OpenCV > 2.4.3 not found.](https://blog.csdn.net/Black__Jacket/article/details/129348285)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [解决 CMake Error at CMakeLists.txt:11 (message): EIGEN3 not found.](https://blog.csdn.net/qq_20826539/article/details/126949942)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值