Hello,
I've been working on a python script that leverages libclang to port my codebase to verdigris.
Since it may be useful to others, here it is : https://github.com/OSSIA/score/blob/master/tools/to_verdigris.py
It requires :
- something that generates a compile_commands.json, in particular I use compdb since it is able to generate a compile_commands.json which has header files.
- python with the libclang wrapper
Usage :
$ to_verdigris.py path/to/a/folder/with/compile_commands.json
There is a bunch of stuff to improve - in particular a pass of clang-format will certainly be required afterwards - but overall it is able to go through most Qt code with Q_OBJECT, Q_PROPERTY, Q_SIGNAL, Q_SLOT, etc etc. It does not yet add W_OBJECT_IMPL to cpp files however - I guess some heuristic could be used for this but for now...
Hello,
I've been working on a python script that leverages libclang to port my codebase to verdigris.
Since it may be useful to others, here it is : https://github.com/OSSIA/score/blob/master/tools/to_verdigris.py
It requires :
Usage :
There is a bunch of stuff to improve - in particular a pass of clang-format will certainly be required afterwards - but overall it is able to go through most Qt code with Q_OBJECT, Q_PROPERTY, Q_SIGNAL, Q_SLOT, etc etc. It does not yet add W_OBJECT_IMPL to cpp files however - I guess some heuristic could be used for this but for now...