[cmake-developers] Introducing the ${Foo_TARGETS} variable (IntroduceTARGETSVariable branch)

Brad King brad.king at kitware.com
Mon Jul 29 09:09:15 EDT 2013


On 07/26/2013 04:17 PM, Alexander Neundorf wrote:
> This should make sure that using this variable in a tll() call should suffice 
> to give the target the required include dirs and libraries.

Sounds good!

I propose the name "Foo_LIBRARY_TARGETS" instead because the intended
use case is only for libraries.

>   KCoreAddons_TARGETS set by it lists the following non-existant targets: Foo

s/existant/existent/

> * Should the variable be mentioned in the documentation for find_package() ?

Yes, since it is this command that enforces the error messages.

> * There is the theoretical risk that there are Config.cmake files out there 
> which set a variable with that name already, but without the include dir 
> property. Should this be based on a policy, so that the error is only 
> generated if cmake 2.8.12 or higher is required ?

I think with the name "<pkg>_LIBRARY_TARGETS" the risk is small.

Thanks,
-Brad



More information about the cmake-developers mailing list