cmGeneratorTarget: Add caches to some functions
Add caches to the following cmGeneratorTarget
functions in order to improve performance:
GetIncludeDirectories
GetCompileOptions
GetCompileDefinitions
GetPrecompileHeaders
GetLinkOptions
GetLinkDirectories
As far as I understand, these functions always return the same result for the same target, config and language. Please let me know if that is not the case!
Edit: caches are now cleared in cmGeneratorTarget::ClearSourcesCache
.
I've measured the performance improvements on a very large CMake project:
Calls to EvaluateTargetPropertyEntry
|
Total Generate time | |
---|---|---|
Without change | 96,514 | 345s |
With change | 65,276 | 278s |
Edited by Pierre Testart