D23789: RFC: Add ECMGenerateExportHeaders, for improved handling of deprecated API

2019-09-23 Thread Friedrich W. H. Kossebau
kossebau updated this revision to Diff 66670.
kossebau added a comment.


  add first set of unit tests covering the main functionality.
  Feedback on principal approach wanted!
  
  Also add some fixes to actual macro code found by the tests already :)

REPOSITORY
  R240 Extra CMake Modules

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23789?vs=65854=66670

BRANCH
  addgenerateexportheader

REVISION DETAIL
  https://phabricator.kde.org/D23789

AFFECTED FILES
  docs/module/ECMGenerateExportHeader.rst
  modules/ECMGenerateExportHeader.cmake
  tests/CMakeLists.txt
  tests/ECMGenerateExportHeaderTest/CMakeLists.txt
  tests/ECMGenerateExportHeaderTest/consumer/CMakeLists.txt
  tests/ECMGenerateExportHeaderTest/consumer/main.cpp
  tests/ECMGenerateExportHeaderTest/format_version/CMakeLists.txt
  tests/ECMGenerateExportHeaderTest/format_version/main.cpp
  tests/ECMGenerateExportHeaderTest/library/CMakeLists.txt
  tests/ECMGenerateExportHeaderTest/library/library.cpp
  tests/ECMGenerateExportHeaderTest/library/library.hpp
  tests/ECMGenerateExportHeaderTest/library/main.cpp

To: kossebau
Cc: chehrlic, dfaure, cgiboudeaux, kde-frameworks-devel, kde-buildsystem, 
LeGast00n, GB_2, bencreasy, michaelh, ngraham, bruns


D24159: new module ECMSourceVersionControl

2019-09-23 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  In D24159#536388 , @kossebau wrote:
  
  > Should the new module be part of public ECM macros? Then it misses a 
documentation linking file `docs/module/ECMSourceVersionControl.rst`
  
  
  I am  blind, ignore me.

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  vcs

REVISION DETAIL
  https://phabricator.kde.org/D24159

To: sitter, kde-buildsystem, dfaure
Cc: kossebau, kde-frameworks-devel, LeGast00n, GB_2, bencreasy, michaelh, 
ngraham, bruns


D24159: new module ECMSourceVersionControl

2019-09-23 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  Should the new module be part of public ECM macros? Then it misses a 
documentation linking file `docs/module/ECMSourceVersionControl.rst`
  
  Would be also good to have this variable being set mentioned in 
KDECompilerSettings, unless this is also not under public API promise ?

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  vcs

REVISION DETAIL
  https://phabricator.kde.org/D24159

To: sitter, kde-buildsystem, dfaure
Cc: kossebau, kde-frameworks-devel, LeGast00n, GB_2, bencreasy, michaelh, 
ngraham, bruns


D24159: new module ECMSourceVersionControl

2019-09-23 Thread David Faure
dfaure accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  vcs

REVISION DETAIL
  https://phabricator.kde.org/D24159

To: sitter, kde-buildsystem, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, bencreasy, michaelh, ngraham, bruns


D24159: new module ECMSourceVersionControl

2019-09-23 Thread Harald Sitter
sitter created this revision.
sitter added reviewers: kde-buildsystem, dfaure.
Herald added projects: Frameworks, Build System.
Herald added a subscriber: kde-frameworks-devel.
sitter requested review of this revision.

REVISION SUMMARY
  simply sets a variable when the source is under version control. use it to
  auto-enable Debug builds. there are also plans to switch special assertion
  logic on in KIO when used from git, so there definitely is a more generic
  use case of wanting to control behavior based on whether it the source is
  likely used to make a development or production build.
  
  conceivably the module could be used in the future to get git rev-parse or
  the like, hence the generic name.

TEST PLAN
  with .git the var is true, without it is false

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  vcs

REVISION DETAIL
  https://phabricator.kde.org/D24159

AFFECTED FILES
  docs/module/ECMSourceVersionControl.rst
  kde-modules/KDECompilerSettings.cmake
  modules/ECMSourceVersionControl.cmake

To: sitter, kde-buildsystem, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, bencreasy, michaelh, ngraham, bruns


D23789: RFC: Add ECMGenerateExportHeaders, for improved handling of deprecated API

2019-09-23 Thread Friedrich W. H. Kossebau
kossebau added a subscriber: chehrlic.
kossebau added a comment.


  @chehrlic Hi. As I just discovered, you are the author of the macros for Qt 
(commit 
)
 which I took as inspiration/blue print when designing this here. So, curious 
what you think of your work now and if you can already point out things where 
you see potential for improvements. And also curious what you think of this 
approach here :)
  
  Actual questions I have:
  
  - why is QT_DEPRECATED_WARNINGS_SINCE not officially documented? like, any 
plans to change that macro to something else?
  - why has all Qt code not yet been adapted to 
QT_DEPRECATED_VERSION/QT_DEPRECATED_VERSION_X, are there places where those 
macros should not be used, but the version-less ones?
  - why did you go for both QT_DEPRECATED_VERSION & QT_DEPRECATED_VERSION_X, 
are there places where no message will be wanted?

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D23789

To: kossebau
Cc: chehrlic, dfaure, cgiboudeaux, kde-frameworks-devel, kde-buildsystem, 
LeGast00n, GB_2, bencreasy, michaelh, ngraham, bruns


D23789: RFC: Add ECMGenerateExportHeaders, for improved handling of deprecated API

2019-09-23 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  Quick Update (week 39):
  took me a bit longer to design and write tests, not trained to write such 
things in cmake code, all its magic & caches & scopes + own undiscovered typos 
make this not (yet?) fun, and I am not certain I have done things properly, so 
will be looking forward to feedback.
  Currently cleaning up and documenting the code, added tests should land 
tonight with an update here (and they already found an error in the so far 
prototype code :) ).
  
  (FTR: Meanwhile saw that Qt actually also introduced QT_DEPRECATED_VERSION_X 
next to QT_DEPRECATED_VERSION, in the very same commit. Not sure what version 
of qglobal.h file I had looked or why I came to claim something else)

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D23789

To: kossebau
Cc: dfaure, cgiboudeaux, kde-frameworks-devel, kde-buildsystem, LeGast00n, 
GB_2, bencreasy, michaelh, ngraham, bruns