Search code examples
clionconan

Integrate CLion with conan test


I followed the example https://github.com/lasote/conan-gtest-example to add GTest to my project via conan. Moreoever I followed these instructions https://docs.conan.io/en/latest/integrations/ide/clion.html to set up conan within CLion. The two samples work as expected. But I cannot get CLion pick up the files under "test_package" when I follow both instructions. How can I set up CLion correctly to work with my test_package by using conan?

Thanks


Solution

  • It's not possible using that plugin.

    The Clion plugin is able to run conan install under the hood. You can take a look on Clion's blog post about how to integrate both tools. The idea is creating a plugin to solve your dependencies for C++ project, not a shortcut when creating Conan packages.

    If you want to build that package and testing it, you should run:

    conan create . soccertrash/testing
    

    The command above will export, install, build and test your package. To learn more about, you can read the docs here.

    To request a new feature, as your mentioned before, you can open a new request for Conan team here.

    Regards!