[cmake-developers] Listing all targets

Stephen Kelly steveire at gmail.com
Sun Mar 13 13:19:49 EDT 2016


Clifford Yapp wrote:

> On Mon, Sep 14, 2015 at 1:47 PM, Stephen Kelly
> <steveire at gmail.com> wrote:
>> Making the target names available through properties via cmState is also
>> trivial after targets become first-class parts of cmState
>> (cmState::Target like cmState::Directory).
>>
>> That can happen sooner (it's on my plate), but required refactoring is
>> also on hold until after CMake 3.4.
> 
> 
> Does anyone recall where the "list all targets" feature ended up?  Is
> it still on hold?  (I apologize if I missed any subsequent discussion
> - just now getting back to this...)

It's not being worked on. I didn't get that far in my refactoring.

If you want to work on it, you can create the cmState::Target and store 
target names in cmState instead of cmTarget (making cmTarget take a 
cmState::Target in order to implement cmTarget::GetName() of course).

Then implementing a global property to get the list of target names is easy.

Thanks,

Steve.




More information about the cmake-developers mailing list