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

CMake-Conan does not honor config mappings in

Open tkielan opened this issue 9 months ago • 5 comments

When CMAKE_MAP_IMPORTED_CONFIG_ is set, it does not affect conan_cmake_install, so if you have mapping like CMAKE_MAP_IMPORTED_CONFIG_SECURE=Release, conan_cmake_install will try to install packages with build_type=Secure instead of Release. Can mapping be supported somehow?

tkielan avatar Jul 09 '25 10:07 tkielan

Hi @tkielan

Thanks for your feedback.

The conan_cmake_install refers to the legacy Conan 1.X integration. Conan 1.X is deprecated and no longer maintained, Conan 2 has been there for 2 years and a half, and it is the only Conan version recommended for production. So consequently, the cmake-conan integration for Conan 1.X is also no longer maintained.

memsharded avatar Jul 09 '25 10:07 memsharded

Is there Conan 2.x integration for CMake available out there?

On Wed, Jul 9, 2025 at 12:59 PM James @.***> wrote:

memsharded left a comment (conan-io/cmake-conan#701) https://github.com/conan-io/cmake-conan/issues/701#issuecomment-3052195555

Hi @tkielan https://github.com/tkielan

Thanks for your feedback.

The conan_cmake_install refers to the legacy Conan 1.X integration. Conan 1.X is deprecated and no longer maintained, Conan 2 has been there for 2 years and a half, and it is the only Conan version recommended for production. So consequently, the cmake-conan integration for Conan 1.X is also no longer maintained.

— Reply to this email directly, view it on GitHub https://github.com/conan-io/cmake-conan/issues/701#issuecomment-3052195555, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAJQJNLM6GMTSDA2TQXEAT3HTYZJAVCNFSM6AAAAACBDYF67WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANJSGE4TKNJVGU . You are receiving this because you were mentioned.Message ID: @.***>

-- Tim Kielan Registered Linux User #239184

vim [noun] - lively or energetic spirit; enthusiasm; vitality

tkielan avatar Jul 09 '25 13:07 tkielan

Yes, of course, the one in this repo. It is using the CMake dependency providers, the instructions are in the main readme: https://github.com/conan-io/cmake-conan

memsharded avatar Jul 09 '25 13:07 memsharded

Thank you!

I was using latest tag from master branch which was 1.18.1. My company is planning recipe migration to 2.x due to 1.x end of life. To make the transition smooth, we updated Conan to 1.66 which supports almost 100% of 2.x recipe formats. We want to make them Conan 1.x and 2.x compatible for the migration period and move to 2.x since then.

It looks like I need to use develop2 branch to be able to utilize mappings with Conan 2.x. Are there any stable releases wfrom develop2?

Thank you so much!

Tim

On Wed, Jul 9, 2025 at 3:27 PM James @.***> wrote:

memsharded left a comment (conan-io/cmake-conan#701) https://github.com/conan-io/cmake-conan/issues/701#issuecomment-3052676745

Yes, of course, the one in this repo. It is using the CMake dependency providers, the instructions are in the main readme: https://github.com/conan-io/cmake-conan

— Reply to this email directly, view it on GitHub https://github.com/conan-io/cmake-conan/issues/701#issuecomment-3052676745, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAJQJKXJ5VMXBPYRRTQM7L3HUKEFAVCNFSM6AAAAACBDYF67WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANJSGY3TMNZUGU . You are receiving this because you were mentioned.Message ID: @.***>

-- Tim Kielan Registered Linux User #239184

vim [noun] - lively or energetic spirit; enthusiasm; vitality

tkielan avatar Jul 09 '25 17:07 tkielan

I was using latest tag from master branch which was 1.18.1.

I see, that explains it, yes.

My company is planning recipe migration to 2.x due to 1.x end of life. To make the transition smooth, we updated Conan to 1.66 which supports almost 100% of 2.x recipe formats. We want to make them Conan 1.x and 2.x compatible for the migration period and move to 2.x since then.

Sounds a good plan, let us know if you have any questions or we can help somehow. Furthermore, if you want to connect, feel free to write to [email protected]

It looks like I need to use develop2 branch to be able to utilize mappings with Conan 2.x. Are there any stable releases wfrom develop2?

We are not doing releases at this moment for the cmake-conan, users are typically "living at head" and getting the latest one from the develop2. It is relatively stable nowadays, and it gets changed very little. Furthermore, often the simplest approach to use it is doing a copy in the repos to inject it easily with presets or -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=, that way, stability is achieve, it is not that things break because the develop2 branch gets some new changes.

In any case, I'll check with @jcar87, it costs very little to tag a release, and if that helps a bit to track things, we can do it.

Thanks to you for your feedback!

memsharded avatar Jul 09 '25 18:07 memsharded