Devolutions / conan-rs

A Rust wrapper of the conan C/C++ package manager (conan.io) to simplify usage in build scripts
Apache License 2.0
37 stars 10 forks source link

Add support for host and build profiles #15

Closed ravenexp closed 1 year ago

ravenexp commented 1 year ago

Conan supports separate host and build profiles since version 1.24.

Setting the build profile is required when cross-compiling using the modern toolchain-based CMake generator.

Add a new InstallCommandBuilder unit test.

awakecoding commented 1 year ago

I'm catching up on pull requests that slipped through, sorry for the delay. I see this would be a breaking change since the InstallCommandBuilder would no longer accept a single profile argument - ideally I think it would be best to add a wrapper that accepts profile to both host and target profiles internally for backwards compatibility. For now, I'll just merge it

ravenexp commented 1 year ago

I'm catching up on pull requests that slipped through, sorry for the delay. I see this would be a breaking change since the InstallCommandBuilder would no longer accept a single profile argument - ideally I think it would be best to add a wrapper that accepts profile to both host and target profiles internally for backwards compatibility.

Not really, InstallCommandBuilder::with_profile() becomes just an alias for InstallCommandBuilder::with_host_profile(). It is a backward compatible change:

https://github.com/Devolutions/conan-rs/pull/15/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R213-R215