mirror of
https://github.com/Kistler-Group/sdbus-cpp.git
synced 2026-01-26 07:32:18 +01:00
feat: add version parameter to xml2cpp codegen tool (#463)
* Added -v, --version xml2cpp command line tool options * Update tools/xml2cpp-codegen/xml2cpp.cpp Co-authored-by: Stanislav Angelovič <stanislav.angelovic@protonmail.com> * Updated tools/CMakeLists.txt --------- Co-authored-by: Stanislav Angelovič <stanislav.angelovic@protonmail.com>
This commit is contained in:
@@ -51,6 +51,7 @@ void usage(std::ostream& output, const char* programName)
|
||||
" --adaptor=FILE Generate header file FILE with stub class (server)" << endl <<
|
||||
" -h, --help " << endl <<
|
||||
" --verbose Explain what is being done" << endl <<
|
||||
" -v, --version Prints out sdbus-c++ version used by the tool" << endl <<
|
||||
endl <<
|
||||
"The stub generator takes an XML file describing DBus interface and creates" << endl <<
|
||||
"C++ header files to be used by C++ code wanting to cumminicate through that" << endl <<
|
||||
@@ -104,6 +105,11 @@ int main(int argc, char **argv)
|
||||
usage(std::cout, programName);
|
||||
return 0;
|
||||
}
|
||||
else if (!strcmp(*argv, "--version") || !strcmp(*argv, "-v"))
|
||||
{
|
||||
std::cout << "Version: " << SDBUS_XML2CPP_VERSION << std::endl;
|
||||
return 0;
|
||||
}
|
||||
else if (!strcmp(*argv, "--verbose"))
|
||||
{
|
||||
verbose = true;
|
||||
|
||||
Reference in New Issue
Block a user