[CMake] addition to GET_TARGET_PROPERTY

Ken Martin ken.martin at kitware.com
Tue Jun 14 15:49:19 EDT 2005


> >
> > Hi,
> >
> > the attached patch adds a read-only property "TYPE" to
> > GET_TARGET_PROPERTY. It returns one of cmTarget::TargetType.
> ...
> 
> A related question, which targets are known in which part of a source
> tree ?
> GET_TARGET_PROPERTY(some_lib) often returned "NOTFOUND", whereas somelib
> is built in the same project. Since cmake is able to manage the
> dependencies, I thought all targets would be know during the cmake run
> basically everywhere. Am I wrong with this ?
> 
> Bye
> Alex

Currently GET_TARGET_PROPERTY can only return properties for targets added
in the current CMakeLists file. However in CMake 2.2 it is possible to make
it work with any target that has been defined up to that point. (e.g. in
parent directories or sibling directories that have already been processed
etc.) Add a feature request to the bug tracker and we'll see if we can get
it into 2.2, it is a pretty easy change.

Thanks
Ken




More information about the CMake mailing list