Review Request 119275: Fix: Same variable in camelCase and REQUIRED_HEADERS doesn't export all headers
Andreas Xavier
andxav at zoho.com
Tue Jul 15 12:09:42 UTC 2014
> On July 14, 2014, 10:57 p.m., Aleix Pol Gonzalez wrote:
> > Is this because of the usage of list(APPEND)? Maybe using set(.. PARENT_SCOPE) for appending would do the trick as well?
Can you confirm that you are seeing the same problem?
This is my first time trying to compile KF5 and the problem is most likely to be with my setup.
If I know that everyone is experiencing the problem, then I will try to fix it in ecm using set( .. PARENT_SCOPE).
- Andreas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119275/#review62358
-----------------------------------------------------------
On July 14, 2014, 6 p.m., Andreas Xavier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119275/
> -----------------------------------------------------------
>
> (Updated July 14, 2014, 6 p.m.)
>
>
> Review request for KDE Frameworks, Alex Merry and Michael Pyne.
>
>
> Repository: kcoreaddons
>
>
> Description
> -------
>
> Using the same variable name for var1 and var2 in the new ecm_generate_headers() syntax, when it is called more than once only exports the headers from the first invokation of ecm_generate_headers(), where var1 and var2 are defined as follows.
>
> ecm_generate_headers(var1
> ...
> REQUIRED_HEADERS var2
> )
>
> It doesn't show up in existing builds because cmake doesn't delete old header files.
>
>
> Steps to Replicate the Problem:
> 1. Delete the existing header files for KCoreAddons and the existing build files.
> rm -r $KF5/KcoreAddons
> rm -r <your kcoreaddons/build directory>
> 2. Re-build kcoreaddons from a new build dir
> cmake -DCMAKE_INSTALL_PREFIX=$KF5 ..
> 3. Check in $KF5/KcoreAddons and there should only be these headers:
> KAboutData kaboutdata.h kcoreaddons_export.h
>
>
> Solution:
> This patch solves the problem by changing the name of var2 to KCoreAddons_HEADERS_lowercase and exporting both KCoreAddons_HEADERS and KCoreAddons_HEADERS_lowercase.
>
> Extended Solution:
> If this patch is approved, then I will
> 1. Submit patches to the other frameworks using ecm_generate_headers() in this fashion.
> 2. submit a patch to extra-cmake-modules to warn when var1 and var2 have the same name.
>
>
> Diffs
> -----
>
> src/lib/CMakeLists.txt 26eb5a1
>
> Diff: https://git.reviewboard.kde.org/r/119275/diff/
>
>
> Testing
> -------
>
> Compiled kcoreaddons, then checked that all headers generated and exported.
>
> Ran unittests.
>
>
> Thanks,
>
> Andreas Xavier
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140715/50941335/attachment.html>
More information about the Kde-frameworks-devel
mailing list