Commit 7213030a authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: display deprecation status in cli (execution and help)

No related merge requests found
Showing with 11 additions and 0 deletions
+11 -0
......@@ -282,6 +282,11 @@ bool CommandLineLauncher::BeforeExecute()
return false;
}
if (m_Application->IsDeprecated())
{
m_Application->GetLogger()->Warning("This application is deprecated and will be removed in a future OTB release.\n");
}
return true;
}
......@@ -584,6 +589,12 @@ void CommandLineLauncher::DisplayHelp(bool longHelp)
std::cerr<<std::endl;
std::cerr << "This is the "<<m_Application->GetDocName() << " ("<<m_Application->GetName()<<") application, version " << OTB_VERSION_STRING <<std::endl<<std::endl;
if (m_Application->IsDeprecated())
{
std::cerr << "WARNING: This application is deprecated, it will be removed in a future OTB release." << std::endl;
std::cerr << std::endl;
}
std::cerr << m_Application->GetDescription() << std::endl;
if(longHelp)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment