cmake-conan icon indicating copy to clipboard operation
cmake-conan copied to clipboard

use different profile while using conan install within cmake

Open laxmij-cmd opened this issue 2 years ago • 3 comments

What is your question?

Hi,

image

As per this documentation, conan install is invoked within cmake. My issue is: I have to provide different profile path to conan install. How can I do this?

Best Regards Laxmi

Have you read the CONTRIBUTING guide?

  • [ ] I've read the CONTRIBUTING guide

laxmij-cmd avatar Oct 18 '23 11:10 laxmij-cmd

This requirement is only for 1 project. In conan 1.x I was able to do so using conan_cmake_install

laxmij-cmd avatar Oct 18 '23 11:10 laxmij-cmd

This looks like a cmake-conan issue, moving it to the right repo

memsharded avatar Oct 18 '23 11:10 memsharded

Thanks for your question. The documentation for this is in https://github.com/conan-io/cmake-conan/tree/develop2#customizing-conan-profiles, something like:

-DCONAN_HOST_PROFILE=default;auto-cmake: perform autodetection as described above, and fallback to the default profile for anything else (default behaviour). -DCONAN_HOST_PROFILE=clang16: do not perform autodetection, and use the clang16 profile which must exist in the Conan profiles folder (see docs.)

memsharded avatar Oct 18 '23 11:10 memsharded