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
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
Check what changed and commit it alongside your other changes:
git status --short -- '**/component_files.cmake'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
- ores.cmake.component — the facet whose
files_src=/=files_testsarchetypes this skill regenerates. - Replace GLOB_RECURSE with explicit source lists across the build — the story that established this convention.