This directory contains build automation and maintenance scripts for the YAZE project.
Automates CMake source list maintenance and header include management with IWYU-style analysis.
By default, the script only auto-maintains source lists that are explicitly marked. To mark a CMake variable for auto-maintenance, add a comment above the set() statement:
The script looks for comments containing "auto-maintain" (case-insensitive) within 3 lines above the set() statement.
To exclude a specific file from all processing (CMake lists, header includes, IWYU), add this token near the top of the file:
The script automatically respects .gitignore patterns. To enable this feature, install the pathspec dependency:
The script includes basic IWYU-style analysis that suggests headers based on symbol prefixes. To customize which headers are suggested, edit the COMMON_HEADERS dictionary in the script:
Note: The IWYU analysis is conservative and may suggest headers that are already transitively included. Use with care and review suggestions before applying.
The script is integrated into the CMake build system:
pathspec (optional, for .gitignore support): pip3 install pathspecset(VAR_NAME ...) blocks with the current list of source files.cc/.cpp file, ensures it includes its corresponding .h fileAll 20 library source lists are now auto-maintained by default:
YAZE_APP_EMU_SRC, YAZE_APP_CORE_SRC, YAZE_APP_EDITOR_SRC, YAZE_APP_ZELDA3_SRC, YAZE_NET_SRC, YAZE_UTIL_SRCGFX_TYPES_SRC, GFX_BACKEND_SRC, GFX_RESOURCE_SRC, GFX_CORE_SRC, GFX_UTIL_SRC, GFX_RENDER_SRC, GFX_DEBUG_SRCGUI_CORE_SRC, CANVAS_SRC, GUI_WIDGETS_SRC, GUI_AUTOMATION_SRC, GUI_APP_SRCYAZE_AGENT_SOURCES, YAZE_TEST_SOURCESThe script intelligently preserves conditional blocks (if/endif) and excludes conditional files from the main source list.