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

Pass Cmake options to Canonfile

Open aminya opened this issue 5 years ago • 2 comments
trafficstars

Is it possible to pass a Cmake option to the Canonfile?

I want to use Cmake options for my build, but also use them for conditional dependency installing in canonfile.

aminya avatar May 22 '20 07:05 aminya

Hi @aminya, Could you please give me more details on the use case? Thanks a lot.

czoido avatar May 22 '20 14:05 czoido

Hi @aminya, Could you please give me more details on the use case? Thanks a lot.

One use-case is when we have some Cmake options that we use for adjusting the build and then we want to pass the same options to the Conan to install the requires based on these options.

Options to adjust the build https://github.com/lefticus/cpp_starter_project/blob/master/src/CMakeLists.txt The place that we could pass them to the Conan file: https://github.com/lefticus/cpp_starter_project/blob/master/cmake/Conan.cmake

This makes it easier to separate the build configurations from package management configuration.

aminya avatar May 22 '20 17:05 aminya