kossebau created this revision. kossebau added reviewers: Build System, Frameworks, dfaure. Herald added projects: Frameworks, Build System. Herald added subscribers: kde-buildsystem, kde-frameworks-devel. kossebau requested review of this revision.
REVISION 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. REPOSITORY R240 Extra CMake Modules BRANCH NO_BUILD_SET_DEPRECATED_WARNINGS_SINCE REVISION DETAIL https://phabricator.kde.org/D25589 AFFECTED FILES modules/ECMGenerateExportHeader.cmake To: kossebau, #build_system, #frameworks, dfaure Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, michaelh, ngraham, bruns