ECMGenerateExportHeader: add NO_BUILD_SET_DEPRECATED_WARNINGS_SINCE flag

Authored by kossebau on Nov 28 2019, 12:48 PM.

Description

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

Details