[CMake] How does :: actually works?

Stephen Kelly steveire at gmail.com
Wed Jun 17 16:58:37 EDT 2015


Klaim - Joël Lamotte wrote:

> Thinking about boost, if package files works well with header-only
> libraries (which I
> suppose it should as long as the boost define header-only targets)
> then it would be very useful indeed.

Yes, I wrote some cmake 3.0 features specifically for the Boost use cases 
(header only and lots of cyclic dependencies).

> Then I have to have all my libraries to link with all the boost libraries
> listed in the boost
> library variable generated by FindBoost.

I don't have working knowledge of FindBoost, so I can't give a good answer. 
The documentation at the top of the file says it creates a variable per 
library though.

> If I understand correctly, if FindBoost was supporting imported targets
> and using "Boost" as a
> namespace (like Qt does), then I could link my libraries to boost
> libraries in a more
> precise way as I would link each library separately instead of everything
> FindBoost
> put in the boost libraries variable.

This still has other advantages anyway, such as transitivity, conciseness, 
consistency, better error messages etc.

Thanks,

Steve.




More information about the CMake mailing list