Use ECMGenerateExportHeader to manage deprecated API better
ClosedPublic

Authored by kossebau on Oct 15 2019, 2:54 PM.

Details

Summary

Allows

  • projects linking to KPackage to hide deprecated API up to a given version or silence deprecation warnings after a given version, using
    • -DKPACKAGE_DISABLE_DEPRECATED_BEFORE_AND_AT
    • -DKPACKAGE_NO_DEPRECATED
    • -DKPACKAGE_DEPRECATED_WARNINGS_SINCE
    • -DKPACKAGE_NO_DEPRECATED_WARNINGS

      or
    • -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT
    • -DKF_NO_DEPRECATED
    • -DKF_DEPRECATED_WARNINGS_SINCE
    • -DKF_NO_DEPRECATED_WARNINGS
  • to build KPackage optionally with deprecated API excluded from the build, using "EXCLUDE_DEPRECATED_BEFORE_AND_AT" cmake argument.
Test Plan

Builds with EXCLUDE_DEPRECATED_BEFORE_AND_AT set to 0, 5.21.0, CURRENT.

Diff Detail

Repository
R290 KPackage
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Oct 15 2019, 2:54 PM
Restricted Application added a project: Frameworks. Β· View Herald TranscriptOct 15 2019, 2:54 PM
Restricted Application added a subscriber: kde-frameworks-devel. Β· View Herald Transcript
kossebau requested review of this revision.Oct 15 2019, 2:54 PM

Given all the KPACKAGE_* macros are public, they should be consistently in the namespace, so for that purpose I also simply changed the BASE_NAME of the export macros.

kossebau updated this revision to Diff 67991.Oct 15 2019, 3:18 PM

keep the current filename of the export header file

@apol Hi. Any chance you can give this a review soon, given this is almost the last one remaining before the complete of all (affected) KF modules to ECMGenerateExportHeader is done, and we can enable the respective KF_* macros?

Seems ok for me +1

Reviewed myself once more and will be pushing now, given this is fairly straightforward after all, so the KF_* flags can be enabled next.

This revision was not accepted when it landed; it landed in state Needs Review.Oct 20 2019, 1:05 AM
This revision was automatically updated to reflect the committed changes.
apol added a comment.Oct 20 2019, 11:13 PM

πŸ‘ sorry about slow reviews. The patch looks good.