----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/119300/#review62408 -----------------------------------------------------------
I don't think this should be necessary. Let's keep discussion on https://git.reviewboard.kde.org/r/119275/ for now, though. modules/ECMGenerateHeaders.cmake <https://git.reviewboard.kde.org/r/119300/#comment43339> This test doesn't do what you think it does. Rather than comparing "${camelcase_headers_var}" with "${EGH_REQUIRED_HEADERS}", it will compare "${${camelcase_headers_var}}" with "${${EGH_REQUIRED_HEADERS}}". Unintuitive, I know. - Alex Merry On July 15, 2014, 1:38 p.m., Andreas Xavier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/119300/ > ----------------------------------------------------------- > > (Updated July 15, 2014, 1:38 p.m.) > > > Review request for KDE Frameworks, Alex Merry and Michael Pyne. > > > Repository: extra-cmake-modules > > > Description > ------- > > First, this is my first attempt at building frameworks, so the problem is > most likely on my end. However, following the instructions at > https://community.kde.org/Frameworks/Building/Details I found this problem. > > Using the same variable name for camelCase var1 and REQUIRED_HEADERS 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, so all accumulated headers remain in the build. > > There are some projects in kde-frameworks that use the same variable name for > var1 and var2, for example kcoreaddons. > > Steps to Replicate Using KCoreAddons as an example: > > 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 > > Problem: > If the same variable name is used for both var1 and var2 they overwrite each > other at the PARENT level and the result is that only one invocation of > ecm_generate_headers sticks. > > Solution: > I assume that the CMakeList writer is intentionally using the same variable > name for var1 and var2 and wants to accumulate both the camelCase and the > lowercase.h names on the same variable. If the variable names are the same > if accumulates both the camelCase list and the lowercase.h list on the single > variable. > > If my assumption is incorrect and var1 and var2 must be different to separate > the camelCase and lowercase.h lists, then a new patch should be submitted to > generate either a warning or an error message when var1 and var2 are the same > name. > > This review is linked with https://git.reviewboard.kde.org/r/119275/. If > this review is accepted then https://git.reviewboard.kde.org/r/119275/ is > unecessary. > > > Diffs > ----- > > modules/ECMGenerateHeaders.cmake bac5086 > > Diff: https://git.reviewboard.kde.org/r/119300/diff/ > > > Testing > ------- > > make test > Compiled kcoreaddons, checked that all the headers were exported. Then > compiled kauth and checked that it found the exported headers. > > > Thanks, > > Andreas Xavier > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel