refactor(cli): migrate runtime and simulator parsers to CLI11

Replace hand-rolled argument parsing with CLI11-backed parse paths for streamer runtime config and simulator runtime options.

Simulator help text is now generated from CLI11 app definitions to keep parser/help output in sync, while preserving legacy validation messages and exit semantics used by automation.
This commit is contained in:
2026-03-05 23:52:09 +08:00
parent 5e430ffa83
commit 7413590519
5 changed files with 974 additions and 723 deletions
+8
View File
@@ -8,6 +8,10 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
find_package(Threads REQUIRED)
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/lib/CLI11/CMakeLists.txt")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/lib/CLI11" "${CMAKE_CURRENT_BINARY_DIR}/vendor/cli11")
endif()
find_package(cppzmq QUIET)
find_package(ZeroMQ QUIET)
find_package(spdlog REQUIRED)
@@ -76,6 +80,10 @@ elseif (TARGET spdlog)
list(APPEND CVMAP_STREAMER_LINK_DEPS spdlog)
endif()
if (TARGET CLI11::CLI11)
list(APPEND CVMAP_STREAMER_LINK_DEPS CLI11::CLI11)
endif()
target_link_libraries(cvmmap_streamer_common PUBLIC ${CVMAP_STREAMER_LINK_DEPS})
function(add_cvmmap_binary target source)