addOption - addOption - 2026.1 English

Vitis Libraries

Release_Date
2026-06-23
Version
2026.1 English
void addOption (
    const std::string opt,
    const std::string opt_full,
    const std::string info,
    const std::string def,
    bool required = false
    )

add an option with value.

Parameters:

opt the short opt name, must start with “-“.
opt_full the full opt name, must start with “–”, pass “” if not used.
info the info to be shown in usage.
def the default value string.
required if an option is required, program with exit upon failure of obtaining value, otherwise default value will be provide.