mirror of
https://github.com/AxioDL/CodeGen.git
synced 2026-03-30 11:45:23 -07:00
30ba348bfd448947156e778c5713bef9f49bbcbe
CodeGen
Python C++ code generation tool using libclang that integrates into qmake. Currently, it provides an enum reflection system that allows you to convert enum constant values to/from string. It could be extended with more features in the future.
Requirements
Running CodeGen requires:
- LLVM 6.0.1 installation; currently must be installed to
C:\Program Files\LLVMon Windows - Python 3.x
- Python packages
clangandmako(install via pip)
Usage
In a qmake project:
- Set CODEGEN_OUT_PATH to the cpp file you would like codegen to output to.
- Set CODEGEN_SRC_PATH to the root folder containing your source files (which will normally be $$PWD).
- Include codegen.pri in your .pro file. The include must be at the bottom of the file, after the SOURCES, HEADERS, and INCLUDEPATH variables are fully initialized.
Include <codegen/EnumReflection.h> to use enum reflection features in your C++ code.
Description
Languages
Python
54.6%
CMake
36%
C++
7.2%
Mako
2.2%