Sounds like this issue: http://www.cmake.org/pipermail/cmake/2010-September/039388.html
I can confirm the wrapper function approach works, using it in BRL-CAD. CY On Tue, Jan 18, 2011 at 5:10 AM, Michael Wild <them...@gmail.com> wrote: > On 01/18/2011 10:55 AM, Eric Noulard wrote: >> Hi All, >> >> Is it possible to get the list of all targets defined in a project (or >> CMakeLists.txt or directory ...) >> from within a CMakeLists.txt ? >> >> Is there some properties for this? >> I did search but didn't find anything, but may be I didn't looked in >> the right place? >> > > Unfortunately, no. That's why I usually wrap add_executable, add_library > etc. in corresponding foo_add_executable, foo_add_library, ... functions > which append the target names to global properties. > > Michael > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake