codegen-sync-cmake-sources

Table of Contents

When to use this skill

A linker error names an undefined symbol that clearly exists somewhere in the tree (typically right after a rebase or merge), or a new .cpp=/.hpp= file was just added to a component and needs to be picked up by the build. Every component's CMakeLists.txt include()=s a generated =component_files.cmake instead of using file(GLOB_RECURSE ...), so a new file on disk is invisible to the build until that generated list is refreshed.

How to use this skill

  1. Regenerate:

    python3 projects/ores.codegen/scripts/regenerate_cmake_component_files.py --all
    

    Or a single component (its model's #+full_name:, not its directory path):

    python3 projects/ores.codegen/scripts/regenerate_cmake_component_files.py --component ores.assets.core
    
  2. Check what changed and commit it alongside your other changes:

    git status --short -- '**/component_files.cmake'
    
  3. Drift check only (no writes) — exits non-zero if anything is stale:

    python3 projects/ores.codegen/scripts/regenerate_cmake_component_files.py --all --check
    

Recipes

Reference

Emacs 29.3 (Org mode 9.6.15)