AW: [CMake] Understanding SET- and GET_TARGET_PROPERTY
wedekind
wedekind at caesar.de
Tue Jun 13 08:02:36 EDT 2006
Hi Brad,
thanks for your reply :)
Both projects are under the same top-level source directory. My problem now
is to find out when a property is set. I guess that the order in which the
projects are read determines when a project's properties are set?
If so, what determines the order in which projects are processed? Is it only
the SUBDIR command or is the order influenced by other commands
(dependencies?) as well?
Thanks
Marco
P.S.: Do you know whether getting and setting of properties works with CMake
2.2.3 too? Do you recommend to upgrade to CMake 2.4 anyway?
-----Ursprüngliche Nachricht-----
Von: Brad King [mailto:brad.king at kitware.com]
Gesendet: Dienstag, 13. Juni 2006 13:55
An: wedekind
Cc: cmake at cmake.org
Betreff: Re: [CMake] Understanding SET- and GET_TARGET_PROPERTY
wedekind wrote:
> Hello all,
>
> I am using CMake 2.2.3 and have a question about SET_TARGET_PROPERTIES and
> GET_TARGET_PROPERTY.
>
> If I am setting a target-specific property like this
>
> SET_TARGET_PROPERTIES(myproject1 PROPERTIES myprop1 myvalue1)
>
> I would like to read this property from another target myproject2 like
this
>
> GET_TARGET_PROPERTY(PROPVAR1 myproject1 myprop1)
>
> Unfortunately this does not work like I have expected it. Can setting and
> getting target properties be used this way? Can I expect to have a target
> property be set for a target myproject1 if I want to read it during
> processing of an arbitrary target myproject2?
This should work in CMake 2.4 as long as both projects are under the
same top-level source directory and that the property is set before it
is read.
-Brad
More information about the CMake
mailing list