install(EXPORT ...) generates outdated configs
cmExportFileGenerator::GeneratePolicyHeaderCode()
generates boilerplate at the top of the file that configures support all the way back to CMake 2.8.3 (according to the RequiredCMakeVersion{Major,Minor,Patch}
values currently set in cmExportFileGenerator.h
).1
On the one hand, it does appear that the code generated is still compatible with CMake 2.8.3+, since it doesn't use any modern features at all.
OTOH, CMake itself is making moves to begin phasing out versions < 3.5. (Like the warning output when cmake_minimum_required()
is passed a lower VERSION
less than 3.5.) So, given that, does it make sense to keep including boilerplate for ancient versions? Or should it be advanced to something more recent, like 3.0 or 3.5? (This would also allow use of more recent features in the future, should opportunities arise.)
Notes
- ...While claiming, in a comment, to "Support CMake versions as far back as 2.6" — which handily demonstrates why comments that describe code are bad.