mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-11 08:22:52 +00:00
5208e083f3
- Peripheral::read/send now return `expected<unique_ptr<Frame>, Error>` for a unified success/error interface. - Peripheral::route returns `expected<unique_ptr<Frame>, Error>` to distinguish intent: (intentional) non-response vs unable to respond - Other functions with optional message semantics (handle,poll,react) return a unique_ptr whose ownership-state indicates response intent (i.e. send new message) Bundled necessary changes: - Switch Frame allocation from global to local (enabled via member function new/delete) - Add new header-library tl::expected to shim avr-libstdcpp Unrelated: Defensive `continue` added after `route`, to reduce Bus activity check latency Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
817 B
CMake
19 lines
817 B
CMake
# Idempotent patch driver for FetchContent PATCH_COMMAND steps.
|
|
#
|
|
# Usage: cmake -DGIT_EXECUTABLE=<git> -DPATCH_FILE=<patch> -P apply-patch.cmake
|
|
# (run with CWD = the populated source directory, as PATCH_COMMAND does).
|
|
#
|
|
# FetchContent re-runs PATCH_COMMAND after its update step on reconfigure, so a
|
|
# bare `git apply` fails the second time around. Skip if the patch is already
|
|
# applied (the reverse-apply dry run succeeds); otherwise apply it for real.
|
|
execute_process(
|
|
COMMAND "${GIT_EXECUTABLE}" apply --reverse --check --ignore-whitespace
|
|
"${PATCH_FILE}"
|
|
RESULT_VARIABLE _already_applied
|
|
OUTPUT_QUIET ERROR_QUIET)
|
|
if(NOT _already_applied EQUAL 0)
|
|
execute_process(
|
|
COMMAND "${GIT_EXECUTABLE}" apply --ignore-whitespace "${PATCH_FILE}"
|
|
COMMAND_ERROR_IS_FATAL ANY)
|
|
endif()
|