friendlyanon / cmake-init

The missing CMake project initializer
GNU General Public License v3.0
2.03k stars 77 forks source link

Adding support for both Release and Debug conan configs #78

Closed matheusgomes28 closed 1 year ago

matheusgomes28 commented 1 year ago

When trying out cmake-init with Conan, I realised that switching between release and debug Conan builds would be a bit of a pain as it installs all the Conan cmake config files in the same directory ${sourceDir}/conan. Check this comment for the idea behind it.

This PR makes the user preset rel for release building, and also adds conan-dev and conan-rel with different toolchain locations.

TODO : I should probably change the docs too in this PR.

matheusgomes28 commented 1 year ago

Will test all the package manager configs, only tested with conan set so far. Tomorrow I'll post some results here if I have time.

matheusgomes28 commented 1 year ago

I don't really see the point of this PR. If the goal is just to show how to use Release builds locally with Conan, I think the user is better off with just reading the Conan docs, since it will inevitably pop up in more projects and people realize package managers are a helpful thing.

I guess there is a point to be made about CI not using both Release and Debug builds to at least show an example. Right now all CI jobs use Release mode dependencies via Conan.

If it's not clear, the point is that if you want to build both for release and debug using conan as the package manager (whether cmake-init docs make it clear or not), you will get an error as it only supports one at at time. I.e. if you want a flexible build out of the box for conan, this doesn't support it and it's clear from the issues people have faced before when setting up their projects with this.

Feel free to close the PR if you don't see the point.