Review Request 122193: ECMGenerateHeaders: look for lower-case.h if lowercase.h does not exist

Alex Merry alex.merry at kde.org
Fri Jan 23 11:18:36 UTC 2015



> On Jan. 23, 2015, 10:25 a.m., Alex Merry wrote:
> > What about TestHeader15? I think you'll get test-header-1-5, which probably isn't what you want.
> > 
> > Also, would having an explicit option maybe be better than guessing based on what files can be found?
> 
> Daniel Vrátil wrote:
>     Yep, the numbers handling is not the best ever, but I'm not sure I'm able to write a regex that would handle it. I would probably have to just iterate over the string and be aware about the context.
>     
>     Option sounds good. If the option is something like REAL_HEADER_NAME_WORDS_SEPARATOR (but shorter) so that one could explicitly specify the separator, we would get support for "a_b.h" headers for free too.

Regexes are greedy; "([A-Z0-9]+)" would probably be reasonably good. It would prevent splitting up something like the D and B in DBusFoo, although it wouldn't deal entirely correctly with HTTPHeader, for example, and you might expect a slightly different split from Header15AndOne. But, in the end, we can't cover every possibility (HTTPHeader, for example, depends on parsing the actual language, which is entirely unreasonable for a simple helper macro).

LOWERCASE_SEPARATOR would probably do, as long as it was documented.


- Alex


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


On Jan. 21, 2015, 9:25 p.m., Daniel Vrátil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122193/
> -----------------------------------------------------------
> 
> (Updated Jan. 21, 2015, 9:25 p.m.)
> 
> 
> Review request for Build System.
> 
> 
> Repository: extra-cmake-modules
> 
> 
> Description
> -------
> 
> Various projects use various naming conventions, so supporting only lowercase.h headers in ECMGenerateHeaders is a bit limiting :) This patch adds a fallback which will try to look for lower-case.h header file in case lowercase.h does not exist.
> 
> 
> Diffs
> -----
> 
>   modules/ECMGenerateHeaders.cmake bac5086 
>   tests/ECMGenerateHeadersTest/run_test.cmake.config 0a2425f 
> 
> Diff: https://git.reviewboard.kde.org/r/122193/diff/
> 
> 
> Testing
> -------
> 
> Added a unit-test which seems to pass.
> 
> 
> Thanks,
> 
> Daniel Vrátil
> 
>

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


More information about the Kde-buildsystem mailing list