cmake回声一个空的cmake_current_source_dir
我正在使用具有版本的Clion的Cmake:
> /snap/clion/189/bin/cmake/linux/bin/cmake --version
CMAKE版本3.22.3 Cmake Suite由Kitware(Kitware.com/cmake)维护和支持。
使用此版本配置我的CMAKE项目时,我会收到以下错误:
CMake Error at test/CMakeLists.txt:6 (find_program):
Could not find TEST_WITH_DATA using the following names:
-- Configuring incomplete, errors occurred!
第6行:
find_program(TEST_WITH_DATA REQUIRED "test_with_data.sh" PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
我真的看不到这里有什么问题?
使用CMAKE版本3.16.3确实可以工作!
I am using cmake with Clion which has version:
> /snap/clion/189/bin/cmake/linux/bin/cmake --version
cmake version 3.22.3 CMake suite maintained and supported by Kitware (kitware.com/cmake).
When configuring my cmake project with this version I get following error:
CMake Error at test/CMakeLists.txt:6 (find_program):
Could not find TEST_WITH_DATA using the following names:
-- Configuring incomplete, errors occurred!
Line 6:
find_program(TEST_WITH_DATA REQUIRED "test_with_data.sh" PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
I really cannot see what the problem is here?
with cmake version 3.16.3 it does work!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论