0

I am using Conan to compile a complex Cpp program. I saw that with the new version of Conan the --install folder parameter has disappeared. I need to create the conanbuildinfo.cmake file (it is required in the program's cmake file). Where is it created? Can I still choose the installation path?

Currently, the cmake instructions require the presence of the conanbuildinfo.cmake file to perform the compilation correctly. Until now, with the old version of conan, I could compile with the command conan install --install folder --build missing

Valeriia
  • 586
  • 2
  • 4
  • 21
Gabriele
  • 1
  • 1
  • 2
    Conan 2.0 no longer create ``conanbuildinfo.cmake``. The new integrations ``CMakeDeps`` and ``CMakeToolchain``, that have been available in Conan 1.X for years, implement a different, fully transparent integration. That means it is not necessary to modify the ``CMakeLists.txt`` at all to use Conan packages. Recommended to read https://docs.conan.io/1/conan_v2.html – drodri Jun 04 '23 at 11:42
  • 1
    @drodri The link you've given focuses on the Conan's Python API. I can't see the sections relevant to the CMakeLists.txt. The example https://github.com/conan-io/cmake-conan.git worked only after the first time; it failed on subsequent run with CMake unable to find Conan-provided dependencies with `find_packages`. I expect I need to instruct CMake somehow about the Conan's existence. Is it the same problem, or should I make a separate post? – Adam Ryczkowski Jul 14 '23 at 07:59
  • That is a completely separate thing, you are talking about cmake-conan, that is a different integration. – drodri Jul 16 '23 at 22:50
  • 1
    I am also having the same issue since conan 2.0 - such a breaking change is really frustrating to deal with. Brand new folder -> `conan new cmake_exe -d myproject name` -> add requirement `boost/[>=1.82.0]` -> `conan install . --build missing --output-folder=dependencies` -> `conan build .` behold, a bunch of boost*.cmake files and conan*.bat files but no reference to them in VS files. Bonus: read doc about v1->v2 migration, says have to specificy `find_package(boost REQUIRED)`. What's the point of conan if I have to maintain all the libraries injection? – pandaman1234 Jul 31 '23 at 16:19

0 Answers0