#include #include #include #include "cvmmap_streamer/common.h" namespace cvmmap_streamer { namespace { constexpr std::array kHelpLines{ "Usage:", " --help, -h\tshow this message", "", "Options:", " --version\tprint version information", "", "Examples:", " cvmmap_streamer --help", " cvmmap_sim --help", " rtp_receiver_tester --help"}; } void print_help(std::string_view executable) { spdlog::info("{}", executable); for (const auto &item : kHelpLines) { spdlog::info("{}", item); } } bool has_help_flag(int argc, char **argv) { for (int i = 1; i < argc; ++i) { std::string_view arg{argv[i]}; if (arg == "--help" || arg == "-h") { return true; } } return false; } }