build(cmake): clean up presets, add release/apple presets, cross-platform triplets
Rationalize the preset set to match the project's actual state (past M5): - Rename dev->skeleton (no-deps stub smoke), m1-dev->dev (default dev preset) - Drop m2-dev (cache-identical to m1-dev) - Add release preset (optimized + tests on, symbols kept) - Strip server-release binaries (-s linker flag) - Add apple-dev/apple-ios/apple-ios-sim scaffolding presets for XCFramework Add cmake/voicecat-toolchain.cmake wrapper that auto-resolves the vcpkg triplet from the host platform (x64-mingw-static/x64-linux/arm64-osx) so the main presets work on Windows/Linux/macOS without per-OS variants. Update all docs (building.md, CLAUDE.md, README.md, AGENTS.md, deployment.md, tech-stack.md, client READMEs) and stale preset-name references in code comments. No C++ behavior changes — the core was already portable.
This commit is contained in:
@@ -6,7 +6,7 @@ target_link_libraries(test_smoke PRIVATE voicecat::voicecat)
|
||||
target_compile_features(test_smoke PRIVATE cxx_std_20)
|
||||
add_test(NAME smoke COMMAND test_smoke)
|
||||
|
||||
# frame_codec has no third-party deps; runs under both dev and m1-dev.
|
||||
# frame_codec has no third-party deps; runs under both skeleton and dev.
|
||||
# Needs core/src on the include path to reach internal headers (protocol/, session/, etc.).
|
||||
add_executable(test_frame_codec test_frame_codec.cpp)
|
||||
target_link_libraries(test_frame_codec PRIVATE voicecat::voicecat)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* test_envelope — round-trip an Envelope through FrameCodec + encode/decode.
|
||||
* Runs only under m1-dev (requires protobuf).
|
||||
* Runs only under dev (requires protobuf).
|
||||
*/
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* test_frame_codec — unit test for FrameCodec::feed / ::emit.
|
||||
*
|
||||
* No third-party dependencies; runs under both the dev and m1-dev presets.
|
||||
* No third-party dependencies; runs under both the skeleton and dev presets.
|
||||
* Tests: empty payload, single byte, 64 KiB, exact max-size, oversized (should reject),
|
||||
* split delivery (bytes fed one-at-a-time), and batched multi-frame delivery.
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* test_opus_codec — Opus encode/decode round-trip, PLC, energy check.
|
||||
*
|
||||
* Requires VOICECAT_HAS_OPUS (m1-dev and m2-dev presets).
|
||||
* Requires VOICECAT_HAS_OPUS (dev and release presets).
|
||||
*/
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
|
||||
@@ -43,7 +43,7 @@ int main() {
|
||||
CHECK(vc_connect(c, nullptr, 1) == VC_ERR_INVALID_ARG);
|
||||
CHECK(vc_send_text(c, VC_TEXT_CHANNEL, 0, nullptr) == VC_ERR_INVALID_ARG);
|
||||
|
||||
// Under dev preset: NOT_IMPLEMENTED. Under m1-dev: VC_OK (async connect).
|
||||
// Under skeleton preset: NOT_IMPLEMENTED. Under dev: VC_OK (async connect).
|
||||
vc_result rc_connect = vc_connect(c, "127.0.0.1", 8384);
|
||||
CHECK(rc_connect == VC_ERR_NOT_IMPLEMENTED || rc_connect == VC_OK);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* test_tcp_loopback — in-process TCP acceptor + client, sends 10 frames.
|
||||
* Runs only under m1-dev (requires Asio).
|
||||
* Runs only under dev (requires Asio).
|
||||
*/
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
|
||||
Reference in New Issue
Block a user