~neon/extra-cmake-modules/master

Viewing all changes in revision 962.

  • Committer: Friedrich W. H. Kossebau
  • Date: 2019-12-01 23:04:38 UTC
  • Revision ID: git-v1:23d868a0771224c844513ab16ae423e5302d139b
ECMGenerateExportHeader: add NO_BUILD_SET_DEPRECATED_WARNINGS_SINCE flag

Summary:
The original intention has been that by default during the build of a
library no warnings should be emitted on using own deprecated API,
as for one that has to be implemented as well as often deprecated API
is implemented using other deprecated API, so the warnings are not
helpful, and having to add lots of push/pop warnings instructions
in the code for the compiler harms readability more than it helps
ensuring to only use deprecated API where one has to.

The original intention was satisfied due to the default mechanism in the
generated export header code, where DEPRECATED_WARNINGS_SINCE if not set
defaults to DISABLE_DEPRECATED_BEFORE_AND_AT. That though breaks once
the group version of DEPRECATED_WARNINGS_SINCE is set in the build, as
this default has higher priority by design, even if the usage here only
wants to target dependency libs of the same group, not the current library.

To restore the intented default behaviour, by default
DEPRECATED_WARNINGS_SINCE is now explicitely set for the library build
itself to the EXCLUDE_DEPRECATED_BEFORE_AND_AT value, and a new macro
option allows to disable this.

Reviewers: #build_system, #frameworks, dfaure

Reviewed By: dfaure

Subscribers: kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

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

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: