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

CONANFILE and REQUIRES at the same time?

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

Is it possible to use CONANFILE and Requires at the same time? CONANFILE also has some requires.

I tested it, and it seems to work, but I just want to make sure.

aminya avatar May 22 '20 07:05 aminya

Hi @aminya, Thanks for the feedback. Only one of the two methods should be used, in fact, I think that using both of them at the same time should throw an error so I'll open a PR to fix this.

czoido avatar May 22 '20 14:05 czoido

This is not a bad thing. I actually like this. As you see here, it allows us to use some options from Cmake to adjust the build and also use the same options for installing the requires.

https://github.com/aminya/cpp_starter_project/blob/000afd3ebef88fa574baca01f802ce6602dfc0d2/cmake/Conan.cmake#L16

Unless #236 becomes available you should not remove this feature.

Related to https://github.com/lefticus/cpp_starter_project/pull/65

aminya avatar May 22 '20 17:05 aminya

So, is this behavior still supported? I want to have both, which gives me the possibility of separating static and dynamic dependencies. If it is supported I would go ahead and use it.

aminya avatar Sep 23 '20 03:09 aminya