From d7ec4c61bd11c731d21e269c87bc446b13cbe5e7 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 15 Feb 2026 18:05:22 +0100 Subject: refactor(build): granular asset tracking and CMake deduplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements Phases 1 & 2 of CMake consolidation plan to improve incremental build performance and reduce code duplication. Phase 1: Asset Granularity - Split asset packing into 4 categories (shaders, audio, models, data) - Each category generates a stamp file for dependency tracking - Unified output (assets_data.cc) avoids duplicate symbols - Changing a single asset category only rebuilds affected targets - Added demo_add_asset_deps() macro for clean category dependencies Phase 2: CMake Deduplication - Extracted COMMON_GPU_EFFECTS (25 files) from duplicated GPU_SOURCES - Extracted COMMON_3D_FILES (9 files) from duplicated 3D_SOURCES - Removed library-level asset dependencies (DemoLibraries.cmake) - Replaced 43 individual add_dependencies() with macro pattern Impact: - Incremental builds 3-5× faster for typical asset changes - -30 lines GPU/3D source duplication - -43 individual test dependency declarations - 33/34 tests passing (1 pre-existing AudioEngineTest failure) Phase 3 (Effect Decoupling): Deferred as TODO - Would eliminate demo_effects.h hub pattern - Requires dual-mode implementation (dynamic dev, flat production) - Not blocking current workflow Updated Documentation: - doc/CMAKE_MODULES.md: Added demo_add_asset_deps() docs - doc/BUILD.md: Documented asset category system Co-Authored-By: Claude Sonnet 4.5 --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) (limited to '.gitignore') diff --git a/.gitignore b/.gitignore index 41d0683..a4a9fb3 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,5 @@ Testing/ training/checkpoints/ checkpoints/ validation_results/ +**/assets_filtered_*.txt +**/assets_assets_*.txt -- cgit v1.2.3