[cmake-developers] define_property deprecated?

Brad King brad.king at kitware.com
Wed Dec 18 11:52:35 EST 2013


On 12/12/2013 01:19 PM, Matthew Woehlke wrote:
> There is some dependency logic that uses custom target 
> properties under the hood.
> 
> Right now I am using define_property to declare those. Should I (can I) 
> not do that?

I don't think there is any reason to use define_property except to
mark a directory property as INHERITED into subdirectories.  IIRC the
command was created in case we wanted to document properties in CMake
module code instead of builtin C++ DefineProperty calls.  That never
really happened and with the new documentation system it is never
needed.

> Loosely related: is there a way to make export() and install(EXPORT) set 
> these properties for exported targets?

Not of which I'm aware.  You can have your package configuration file
add them after loading the imported targets, but that would be a
(centralized) workaround.

-Brad



More information about the cmake-developers mailing list