Re: RFC: post-installation checks on library headers & cmake config
Nandani Chaurasia <[email protected]> Sun, 5 Jul 2026 00:39:09 +0530
| Newsgroups | gmane.comp.kde.devel.general |
|---|---|
| Message-ID | <CAOmeS9=yVuASOq0K4pgWMiBk9kvZSU8ruh+4f1AZjC_yeDPvHg@mail.gmail.com> |
--0000000000007822750655cdc7e3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Friedrich, I am interested in contributing to KDE and would like to try ECMInstalledLibraryCheck. I am still getting familiar with the KDE contribution workflow. At the moment, I am getting a =E2=80=9CForbidden=E2=80=9D error when trying= to open KDE Invent. Could you please suggest what I should do to get access, and whether there is a beginner-friendly area where feedback, documentation improvements, or additional test coverage would be useful? I would be happy to test the prototype on a small CMake/C++ project and share feedback. Best regards, Nandani On Sat, Jul 4, 2026, 8:52 PM Friedrich W. H. Kossebau <[email protected]> wrote: > Hi, > > how would you feel if there is an option to automatically test the C++ > library development artifacts (headers, CMake config, etc.) in their > installed variant for usability, before other developers get to use them? > > If that sounds somewhere interesting to you, read on :) > > Possibly you also have already heard of this, there is currently some on- > going effort to develop a system for post-installation C++ library checks= , > by the implementation name ECMInstalledLibraryCheck. While already in som= e > usable state and there-by successfully having uncovered a number of > issues, > it is based only on a few people's needs & ideas, without any known > similar > solutions to be "inspired" from for features and patterns. > > > YOUR INPUT & COLLABORATION IS VERY WANTED > > What are your pain points with installed C++ library artifacts you wish > that > would be tested (and which cannot be tested uninstalled)? What problems > have > you seen? > > What similar solutions do exist already, for comparison & inspiration? > > Would you have fun working on integrating such checks into KDE CI? > > Have you tried the current prototype of ECMInstalledLibraryCheck on your > library, what issues did you detect in your library, what features would > you > like in the check? (if not yet, see blog post linked below how to do) > > Special question: have you seen public preprocessor definitions whose > values > depends on the build which only are defined with some library headers? > > > SMALL PEAK INTO PROTOTYPE FUNCTIONALITY > > To get an idea on the current approach with ECMInstalledLibraryCheck, the > checks are added by declaring them via such functions (by the example of > KContacts): > > --- 8< --- > # use the module from ECM > include(ECMInstalledLibraryCheck) > # for the library target KF6Contacts set up the check > ecm_add_installed_library_check(KF6Contacts > PACKAGE_NAME "KF6Contacts" > PACKAGE_VERSION ${KCONTACTS_VERSION} > PACKAGE_TARGET_NAMESPACE "KF6::" > ) > # register the official include statements for the check > ecm_installed_library_check_include_strings(KF6Contacts > HEADERS ${KContacts_CamelCase_HEADERS} > PREFIX KContacts > ) > --- 8< --- > > Further checks on certain aspects can be added by functions like > ecm_installed_library_check_cmake_variable(), > ecm_installed_library_check_compile_definition() and > ecm_installed_library_check_preprocessor_macro(). Already there is a > convenience variant of the last: > --- 8< --- > # check all includes also have the usual version macros defined afterward= s > ecm_installed_library_check_version_preprocessor_macros(KF6Contacts > PREFIX KCONTACTS > VERSION ${KCONTACTS_VERSION} > SILENT # only report errors > ) > --- 8< --- > > The check on the library then will appear as global build system target > "all_installed_library_check", as well as variants per library. > > > MORE INFO > > Find the merge request of ECMInstalledLibraryCheck here: > https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/59= 0 > > A longer blog post going into details, also how to test-drive the check: > > https://frinring.wordpress.com/2026/06/30/c-library-headers-cmake-config-= files-are-we-serviceable/ > > > TRY IT, COMMENT IT > > Be very invited to shape this installed library check solution, so it can > be > useful to you right from the its first release. > Give it 15 minutes now for some considerations & feedback, and hopefully > save many more minutes in the future :) > > Hope to hear from you (even just a "want-this" or "useless-because"), > and thanks to those who already contributed. > > Cheers > Friedrich > > > --0000000000007822750655cdc7e3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto">Hi Friedrich,<div dir=3D"auto"><br></div><div dir=3D"auto= ">I am interested in contributing to KDE and would like to try ECMInstalled= LibraryCheck. I am still getting familiar with the KDE contribution workflo= w.</div><div dir=3D"auto"><br></div><div dir=3D"auto">At the moment, I am g= etting a =E2=80=9CForbidden=E2=80=9D error when trying to open KDE Invent. = Could you please suggest what I should do to get access, and whether there = is a beginner-friendly area where feedback, documentation improvements, or = additional test coverage would be useful?</div><div dir=3D"auto"><br></div>= <div dir=3D"auto">I would be happy to test the prototype on a small CMake/C= ++ project and share feedback.</div><div dir=3D"auto"><br></div><div dir=3D= "auto">Best regards,</div><div dir=3D"auto">Nandani</div></div><br><div cla= ss=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_at= tr">On Sat, Jul 4, 2026, 8:52 PM Friedrich W. H. Kossebau <<a href=3D"ma= ilto:[email protected]">[email protected]</a>> wrote:<br></div><blockquote= class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc soli= d;padding-left:1ex">Hi,<br> <br> how would you feel if there is an option to automatically test the C++ <br> library development artifacts (headers, CMake config, etc.) in their <br> installed variant for usability, before other developers get to use them?<b= r> <br> If that sounds somewhere interesting to you, read on :)<br> <br> Possibly you also have already heard of this, there is currently some on-<b= r> going effort to develop a system for post-installation C++ library checks,<= br> by the implementation name ECMInstalledLibraryCheck. While already in some = <br> usable state and there-by successfully having uncovered a number of issues,= <br> it is based only on a few people's needs & ideas, without any known= similar <br> solutions to be "inspired" from for features and patterns.<br> <br> <br> YOUR INPUT & COLLABORATION IS VERY WANTED<br> <br> What are your pain points with installed C++ library artifacts you wish tha= t <br> would be tested (and which cannot be tested uninstalled)? What problems hav= e <br> you seen?<br> <br> What similar solutions do exist already, for comparison & inspiration?<= br> <br> Would you have fun working on integrating such checks into KDE CI?<br> <br> Have you tried the current prototype of ECMInstalledLibraryCheck on your <b= r> library, what issues did you detect in your library, what features would yo= u <br> like in the check? (if not yet, see blog post linked below how to do)<br> <br> Special question: have you seen public preprocessor definitions whose value= s <br> depends on the build which only are defined with some library headers?<br> <br> <br> SMALL PEAK INTO PROTOTYPE FUNCTIONALITY<br> <br> To get an idea on the current approach with ECMInstalledLibraryCheck, the <= br> checks are added by declaring them via such functions (by the example of <b= r> KContacts):<br> <br> --- 8< ---<br> # use the module from ECM<br> include(ECMInstalledLibraryCheck)<br> # for the library target KF6Contacts set up the check<br> ecm_add_installed_library_check(KF6Contacts<br> =C2=A0 =C2=A0 PACKAGE_NAME "KF6Contacts"<br> =C2=A0 =C2=A0 PACKAGE_VERSION ${KCONTACTS_VERSION}<br> =C2=A0 =C2=A0 PACKAGE_TARGET_NAMESPACE "KF6::"<br> )<br> # register the official include statements for the check<br> ecm_installed_library_check_include_strings(KF6Contacts<br> =C2=A0 =C2=A0 HEADERS ${KContacts_CamelCase_HEADERS}<br> =C2=A0 =C2=A0 PREFIX KContacts<br> )<br> --- 8< ---<br> <br> Further checks on certain aspects can be added by functions like <br> ecm_installed_library_check_cmake_variable(), <br> ecm_installed_library_check_compile_definition() and <br> ecm_installed_library_check_preprocessor_macro(). Already there is a <br> convenience variant of the last:<br> --- 8< ---<br> # check all includes also have the usual version macros defined afterwards<= br> ecm_installed_library_check_version_preprocessor_macros(KF6Contacts<br> =C2=A0 =C2=A0 PREFIX KCONTACTS<br> =C2=A0 =C2=A0 VERSION ${KCONTACTS_VERSION}<br> =C2=A0 =C2=A0 SILENT # only report errors<br> )<br> --- 8< ---<br> <br> The check on the library then will appear as global build system target <br= > "all_installed_library_check", as well as variants per library.<b= r> <br> <br> MORE INFO<br> <br> Find the merge request of ECMInstalledLibraryCheck here:<br> <a href=3D"https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_re= quests/590" rel=3D"noreferrer noreferrer" target=3D"_blank">https://invent.= kde.org/frameworks/extra-cmake-modules/-/merge_requests/590</a><br> <br> A longer blog post going into details, also how to test-drive the check:<br= > <a href=3D"https://frinring.wordpress.com/2026/06/30/c-library-headers-cmak= e-config-files-are-we-serviceable/" rel=3D"noreferrer noreferrer" target=3D= "_blank">https://frinring.wordpress.com/2026/06/30/c-library-headers-cmake-= config-files-are-we-serviceable/</a><br> <br> <br> TRY IT, COMMENT IT<br> <br> Be very invited to shape this installed library check solution, so it can b= e <br> useful to you right from the its first release.<br> Give it 15 minutes now for some considerations & feedback, and hopefull= y <br> save many more minutes in the future :)<br> <br> Hope to hear from you (even just a "want-this" or "useless-b= ecause"),<br> and thanks to those who already contributed.<br> <br> Cheers<br> Friedrich<br> <br> <br> </blockquote></div> --0000000000007822750655cdc7e3--