Skip to content

oreyg/hqcodegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HQCodeGen

Code generation tool for the Hokku engine. Parses C++ headers using libclang and emits reflection, enum-to-string, and HashLink binding code via inja templates.

See hqcodegen_demoproject for a working integration example, including CMake wiring, tests, and HashLink bindings.

Prerequisites

  • Python 3.*
  • Conan 2.* (pip install conan)
  • CMake 3.28+
  • LLVM/Clang 15-17 (libclang)
  • On Windows (MSVC):
    • MSVC v143 - VS 2022 C++ x64/x86 build tools

Building

1. Install Conan dependencies

conan install . -of Conan -b missing -s build_type=Release -c tools.cmake.cmaketoolchain:generator=Ninja

2. Configure environment (Windows only)

Conan\conanbuild.bat

3. Configure, build, install

cmake --preset CodeGen -DLIBCLANG_ROOT=<path-to-clang>
cmake --build Build
cmake --install Build

The executable and templates are installed to Install/CodeGen/.

Usage

Install/CodeGen/HQCodeGen.exe \
    --input="<source-dir>" \
    --output="<output-dir>" \
    --template_path="Install/CodeGen" \
    --plugin_name="<ModuleName>"

See Examples.md for more details.

About

Flexible Code Generator for C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors