[cmake-developers] Listing all targets

Stephen Kelly steveire at gmail.com
Mon Sep 14 13:47:23 EDT 2015


Brad King wrote:

> On 09/14/2015 11:46 AM, David Cole wrote:
>> (1) I see how I can easily move "COMPONENTS" from
>> cmGetCMakePropertyCommand::InitialPass to cmState::GetGlobalProperty
>> because I can access the global generator from cmState as well...
> 
> Yes.

I assume you're thinking of getting the global generator from the cmake 
instance?

That's not appropriate. The cmState should not know the cmake instance or 
the global generator.  The fact that it currently knows the cmake instance 
is a temporary evil of the cache stuff not being fully refactored yet. 

The install components would need to become 'first-class' parts of cmState, 
in the same way that definitions and properties became first-class (ie, not 
by making cmState aware of cmMakefile!). 

That refactoring can be done if you want to give it a shot and see what's 
needed, but it is a post-3.4 branch. 

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.

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/14286/focus=14323

Thanks,

Steve.




More information about the cmake-developers mailing list