我想在CLion项目中使用conan。柯南生成了一个
conanbuildinfo.cmake
文件。在这个文件中,它试图读取另一个文件,这个文件也是由conan生成的,名为
conaninfo.txt
.
它找不到它,cmake将打印以下错误:
CMake Error at D:/Sources/vodrm-ecmg_c++/build/conanbuildinfo.cmake:663 (file):
file failed to open for reading (No such file or directory):
/cygdrive/d/Sources/myproject/D:/Sources/myproject/build/conaninfo.txt
如您所见,错误是cmake找不到请求的文件。但它实际上可以,因为下面的代码:
if (EXISTS ${_CONAN_CURRENT_DIR}/conaninfo.txt)
message("Found :" ${_CONAN_CURRENT_DIR}/conaninfo.txt)
endif()
file (READ "${_CONAN_CURRENT_DIR}/conaninfo.txt" CONANINFO)
印刷品:
Found :D:/Sources/project/build/conaninfo.txt
这完全是自相矛盾的,因为cmake正在查找文件,但在使用
file
命令。
有人遇到过这个吗
缺陷
,如果是一个,在之前?有什么解决办法吗?我真的不知道我做错了什么,因为这个文件是由柯南生成的。
顺便说一下,我使用的是cmake 3.6.2版。
提前谢谢。