Use ECMGenerateExportHeader to manage deprecated API better

Authored by kossebau on Oct 7 2019, 5:02 PM.

Description

Use ECMGenerateExportHeader to manage deprecated API better

Summary:
Allows

  • projects linking to KCompletion to hide deprecated API up to a given version or silence deprecation warnings after a given version, using
    • -DKCOMPLETION_DISABLE_DEPRECATED_BEFORE_AND_AT
    • -DKCOMPLETION_NO_DEPRECATED
    • -DKCOMPLETION_DEPRECATED_WARNINGS_SINCE
    • -DKCOMPLETION_NO_DEPRECATED_WARNINGS

      or
    • -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT
    • -DKF_NO_DEPRECATED
    • -DKF_DEPRECATED_WARNINGS_SINCE
    • -DKF_NO_DEPRECATED_WARNINGS
  • to build KCompletion 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, 4.0.0, 4.5.0,
5.0.0, 5.46.0, CURRENT.

Reviewers: Frameworks, mlaurent

Reviewed By: mlaurent

Subscribers: kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D24495

Details

Committed
kossebauOct 17 2019, 2:25 PM
Reviewer
mlaurent
Differential Revision
D24495: Use ECMGenerateExportHeader to manage deprecated API better
Parents
R284:175c8119ce44: GIT_SILENT Upgrade KF5 version to 5.64.0.
Branches
Unknown
Tags
Unknown