Add Version member to FairMQDevice, settable via constructor

This commit is contained in:
Alexey Rybalchenko
2017-07-05 08:37:31 +02:00
committed by Mohammad Al-Turany
parent 3d8175bfd6
commit 65f1b96dc3
8 changed files with 143 additions and 14 deletions

View File

@@ -74,9 +74,9 @@ void FairMQProgOptions::ParseAll(const int argc, char const* const* argv, bool a
exit(EXIT_SUCCESS);
}
if (fVarMap.count("print-channels"))
// if these options are provided, do no further checks and let the device handle them
if (fVarMap.count("print-channels") || fVarMap.count("version"))
{
// if this option is provided, do no further checks and let the device print the channels
DefaultConsoleSetFilter(fSeverityMap.at("NOLOG"));
return;
}
@@ -298,12 +298,6 @@ int FairMQProgOptions::NotifySwitchOption()
return 1;
}
if (fVarMap.count("version"))
{
LOG(INFO) << fVersion << "\n";
return 1;
}
return 0;
}