Skip to content

[MAINTENANCE] Replace vendored yaml-cpp with CMake FetchContent for cross-platform builds #138

@yunlishao-vibe

Description

@yunlishao-vibe

Summary

yaml-cpp is currently fully vendored in `CommonLib/yaml-cpp/` (v0.7.0, ~500 files). This bloats the repo, makes version tracking manual, and ties the build system to Windows `.bat`/`.ps1` scripts — blocking progress on issue #65 (Linux compile support).

Proposed Changes

  • Replace `CommonLib/yaml-cpp/` source tree with a `CMakeLists.txt`-based `FetchContent` declaration pinned to a specific tag
  • Update `dependencies.yaml` to record the pinned yaml-cpp version (currently `0.7.0`, upstream is `0.8.0`)
  • Update `scripts/dispatch/1_external_libraries.bat` (or replace with a CMake configure step) to fetch and build yaml-cpp automatically
  • Remove the ~500 vendored files from git tracking

Motivation

  • Prerequisite for Linux/cross-platform builds (issue [FEATURE] Enable both windows and linux compile #65) — the current `.bat` build system is Windows-only
  • Reduces repo size significantly
  • Version bumps become a one-line change in `dependencies.yaml`
  • Follows modern CMake best practices

Acceptance Criteria

  • `CommonLib/yaml-cpp/` source tree removed from git
  • `FetchContent` (or equivalent) fetches yaml-cpp at the pinned version during CMake configure
  • Windows build (`dispatch.bat`) still works after change
  • `dependencies.yaml` updated with explicit yaml-cpp version
  • Build documentation updated in `doc/BUILD.md`

Notes

yaml-cpp v0.7.0 → v0.8.0 has no breaking API changes for FIXS usage. The migration can bump to v0.8.0 at the same time.

Related: #65 (Linux compile), #131 (build system cleanup)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions