I don't know about the targets, but you can get all variables currently
defined for a directory by reading the VARIABLES property, e.g.
get_property(_variables DIRECTORY "${CMAKE_SOURCE_DIR}" PROPERTY VARIABLES)
I use this to dump the variables into a file so I can see with which
variable settings my build directory was configured with.
With kind regards,
Eric
Am 20.09.19 um 14:49 schrieb Cornelis Bockemühl:
Right now I am fighting my way through large amounts of CMake code
(actually working on a ParaView custom application with many own
plugins, views, domains, property widgets etc. etc.), and it is
sometimes really not easy not to lose track completely! Sometimes I am
happy to be back into complex C++ programming - because I see much
more logic in the entire thing. And it is of course no news that CMake
code is not famous for being easy to debug.
Anyway, I am dreaming of some "simple" features that would sometimes
help a lot, and it is all about "dumping" some kind of data. Actually
this is for me often also the favorite way to debug C++ code: just
print out the values of variables, arrays, etc. - e.g. if setting a
breakpoint in the debugger is difficult because you are interested
only in the 928773th occurrence of a certain piece of code (without
even knowing that number...).
Accordingly in CMake code I am working a lot with the message()
function - but within that code the problem is often that you do not
even know which variables would be available at all!
Thus functions like would be really great to have:
“give me a list of all currently known targets”
“give me a list of all properties of a target”
“give me a list of all currently defined variables”
etc.
What I do not know is: Are this things that already exist - in which
case I would be happy if somebody could tell me how to find them! -,
or are these functions rather "feature requests"?
In fact I can hardly believe that I am the first with such kind of
dreams, so my hope is still that they already exist somewhere...
--
Cornelis Bockemühl
mail: corne...@bockemuehl.ch
phone: +41 79 644 9943
Basel, Switzerland
https://cobo.bockemuehl.ch
<https://cobo.bockemuehl.ch>
--
*Dr. Eric Dönges*
Senior Software Engineer
MVTec Software GmbH | Arnulfstr. 205 | 80634 Munich | Germany
doen...@mvtec.com <mailto:musterm...@mvtec.com> | Tel: +49 89 457 695-0
| www.mvtec.com <http://www.mvtec.com>
Find our privacy policy here <https://www.mvtec.com/imprint>.
Sign up <https://www.mvtec.com/newsletter> for our MVTec Newsletter!
Geschäftsführer: Dr. Wolfgang Eckstein, Dr. Olaf Munkelt
Amtsgericht München HRB 114695
MVTec Software GmbH Logo
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake