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

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

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to