Review Request 122317: Extend ecm_generate_headers macro to also support CamelCase.h headers

Friedrich W. H. Kossebau kossebau at kde.org
Thu Jan 29 20:42:58 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122317/
-----------------------------------------------------------

Review request for Extra Cmake Modules and Alex Merry.


Repository: extra-cmake-modules


Description
-------

There are at least two projects I know which have CamelCase.h headers, Calligra and KDChart. Still it would be nice to also allow pure CamelCase headers (suffix less) for usage by lib-using developers. Just, currently the macro ecm_generate_headers assumes the original headers to be lowercase. So it cannot be used for the mentioned projects.
Worse, ecm_generate_headers also has a very nice additional feature, having copies of the original headers in the build dir created with the same layout as there will be after installation, so e.g. code of demos and tests can be written as if it is 3rd-party outside the project.

Attached patch extends ecm_generate_headers to support an optional parameter `ORIGINAL` (perhaps a better term could be found), by which the casing of the original headers can be specified. Currently `CAMELCASE` and `LOWERCASE` are supported. But perhaps one day someone could extend it for underscore-casing :). The parameter defaults to `LOWERCASE` and thus should be backwards portable.

Tested also with prefixes.

Not sure the assumption that the original prefix has the same casing as the original headers, I remember to have seen code where that is not consistent. But that step to implement is left for those persons who really need it ;)


Diffs
-----

  modules/ECMGenerateHeaders.cmake bac5086 

Diff: https://git.reviewboard.kde.org/r/122317/diff/


Testing
-------


Thanks,

Friedrich W. H. Kossebau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20150129/fc53b7da/attachment.html>


More information about the Kde-buildsystem mailing list