[cmake-developers] target_include_directories branch in stage

Stephen Kelly steveire at gmail.com
Sun Dec 4 13:14:11 EST 2011


Alexander Neundorf wrote:

> On Sunday 04 December 2011, Stephen Kelly wrote:
>> David Cole wrote:
>> > I, for one, would really like to see per-target include directories in
>> > 2.8.7, even without per-config support to start with. Then, add the
>> > per-config support / new generator expressions in a later release.
>> 
>> That seems unlikely to happen. If RC1 is Wednesday, it would have to be
>> clean on the dashboard by then, which means cleanup of issues reported by
>> the nightlies on Tuesday, which means putting it in next on Monday in
>> order to get the nightlies generated.
>> 
>> I've pushed the branch to my gitorious clone again.
>> 
>> https://gitorious.org/~steveire/cmake/steveires-cmake
>> 
>> The top two commits need to be reviewed and have real fixes decided and
>> written for them. Should the memoization be removed? What does
>> cmMakeDepends do? Note that if the goal is to merge this into next on
>> Monday, there is little point explaining this to me and asking me to make
>> the necessary changes. That would be too inefficient. git reset HEAD^^
>> and doing the fixes would be better.
>> 
>> Additionally, the generators for XCode and VisualStudio don't build in
>> the branch (though I haven't tried) because I changed the signature of
>> LocalGenerator::GetIncludeDirectories. Again, that would have to be fixed
>> by someone with direct access to those platforms and/or generators.
>> 
>> Finally, the Eclipse generator builds, and all tests pass, which means
>> mostly that I don't know how to test it. I didn't port it away from
>> cmMakefile::GetIncludeDirectories, and yet the (updated)
>> IncludeDirectories test passes. I expected the test to fail. To run the
>> test I did:
>> 
>> mkdir eclipse_gen && cd eclipse_gen
>> cmake .. -G "Eclipse CDT4 - Unix Makefiles" && make
>> ./bin/ctest
> 
> The Eclipse generator generates Makefiles, and additionally Eclipse
> project files. But those are not tested during the tests, only the
> makefiles are tested.
> I don't know of any way to test automatically whether an Eclipse project
> works (except loading it manually).
> 
> What could be broken there ?
> 

The IncludeDirectories test. The Eclipse generator calls 
GetIncludeDirectories on the cmMakefile instead of asking the targets for 
the include directories.

stephen at hal:~/dev/src/cmake{target-include-directories}$ git grep 
GetIncludeDirec | grep Eclip
Source/cmExtraEclipseCDT4Generator.cxx:      = (*it)->GetMakefile()-
>GetIncludeDirectories();

See the commit 'Extract and use the INCLUDE_DIRECTORIES target properties' 
in the branch, in particular the change to 
Source/cmLocalUnixMakefileGenerator3.cxx. Perhaps something similar is 
needed in the eclipse generator.

Thanks,

Steve.





More information about the cmake-developers mailing list