[CMake] How to retrieve the property list dynamically?

David Cole david.cole at kitware.com
Mon Jan 24 11:29:18 EST 2011


On Mon, Jan 24, 2011 at 11:16 AM, SF Markus Elfring <
elfring at users.sourceforge.net> wrote:

> No, there is presently no facility for retrieving a list of properties.
>>
>
> Is such a functionality also missing for variable names and their
> attributes?
>

If you look at the top of this page:
http://cmake.org/cmake/help/cmake-2-8-docs.html

There are links to the "well known by CMake" properties that exist on
various entities: global, directories, targets, tests, files, cache
variables.

There is also the command line:
  cmake --help-property-list

However, the property mechanism allows project-specific extension of the set
of properties on many of these entities. So these lists are incomplete.

To see about variables and cache variables, see the cmake command:
http://cmake.org/cmake/help/cmake-2-8-docs.html#command:get_cmake_property

which, at present, can list for you: VARIABLES, CACHE_VARIABLES, COMMANDS,
MACROS, and COMPONENTS



>
> Are more software developers interested to query settings only from a
> subset of items?
>

I'm sure many are interested.

Is there a concrete problem you are trying to solve by asking these
questions? If you have a specific problem, perhaps there's a way to get
something working for you without these additions to CMake. Can you tell us
if you have a specific problem you're trying to solve?




>
> Regards,
> Markus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110124/fa9fdc96/attachment-0001.htm>


More information about the CMake mailing list