6981f55f28
canon sync rewrites the managed block of CMakeLists.txt from .canon.toml, for after either was edited by hand. It prints a unified diff of the change (also with --dry-run), writes only CMakeLists.txt so comments in .canon.toml survive, does nothing if the block already matches, and warns when the build will still fail because .canon.toml declares files that do not exist. doctor's hand-edited-block warning now points to it. - diff: a small line-based unified diff, no external tools - tests: a sync scenario (hand-edited manifest, --dry-run leaves the file untouched, sync from a subdirectory, no-op second run, hand edits in the block replaced); unit tests for plan_sync and unified_diff Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
31 lines
542 B
TOML
31 lines
542 B
TOML
# edited by hand
|
|
# canon project manifest: what canon declared for this project.
|
|
# The managed block in CMakeLists.txt is rendered from this file.
|
|
|
|
[project]
|
|
name = "libhello"
|
|
kind = "lib"
|
|
stem = "hello"
|
|
spec = "P1204R0"
|
|
|
|
[build]
|
|
backend = "cmake"
|
|
cmake-minimum = "3.20"
|
|
cxx-standard = 23
|
|
|
|
[[targets]]
|
|
name = "libhello"
|
|
type = "library"
|
|
sources = ["hello/hello.cpp", "hello/extra.cpp"]
|
|
|
|
[[modules]]
|
|
path = "hello/hello"
|
|
target = "libhello"
|
|
unit-test = true
|
|
|
|
[[tests]]
|
|
name = "basics"
|
|
kind = "driver"
|
|
path = "tests/basics"
|
|
target = "libhello"
|