0

I am trying to use conan in a CLion project. Conan generates a conanbuildinfo.cmake file. In this file, it's trying to read another file, generated by conan too, and called conaninfo.txt.

It's not able to find it, and cmake prints the following error :

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

As you can see the error is saying cmake could not find the requested file. But it actullay can, because the following code :

if (EXISTS ${_CONAN_CURRENT_DIR}/conaninfo.txt)
    message("Found :" ${_CONAN_CURRENT_DIR}/conaninfo.txt)
endif()
file (READ "${_CONAN_CURRENT_DIR}/conaninfo.txt" CONANINFO)

Prints :

Found :D:/Sources/project/build/conaninfo.txt

It's totally contradicting since cmake is finding the file, but not when using file command.

Did anyone encountered this bug, if it's one, before? Any solution? I really don't see what I am doing wrong, since this file is generated by conan.

By the way, I am using cmake version 3.6.2.

Thanks in advance.

souki
  • 1,305
  • 4
  • 23
  • 39
  • `/cygdrive/d/Sources/myproject/D:/Sources/myproject/build/conaninfo.txt` - this doesn't look like a valid path, should be `/cygdrive/d/Sources/myproject/build/conaninfo.txt`. Are you mixing Cygwin- and non-Cygwin tools? – Paul Jul 02 '18 at 16:02
  • I know it's weird, but the path seems wrong only in the error message. In fact, `${_CONAN_CURRENT_DIR}/conaninfo.txt` prints `D:/Sources/myproject/build/conaninfo.txt`. And I am not mixing Cygwin and non-Cygwin tools! – souki Jul 02 '18 at 22:47

0 Answers0