From Mike Wittman and Robert Osfield, added support for SO_VERSION number in
runtime version info. Added checks for OpenThreads version.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <osg/Version>
|
||||
#include <osg/ArgumentParser>
|
||||
#include <osg/ApplicationUsage>
|
||||
#include <OpenThreads/Version>
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
@@ -649,6 +650,9 @@ int main( int argc, char **argv)
|
||||
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--entries","Print out number of entries into the ChangeLog file for each contributor.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--version-number","Print out version number only");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--soversion-number","Print out shared object version number only");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--openthreads-version-number","Print out version number for OpenThreads only");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--openthreads-soversion-number","Print out shared object version number for OpenThreads only");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("-r <file> or --read <file>","Read the ChangeLog to generate an estimated contributors list.");
|
||||
|
||||
if (arguments.read("--version-number"))
|
||||
@@ -657,6 +661,24 @@ int main( int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (arguments.read("--soversion-number"))
|
||||
{
|
||||
std::cout<<osgGetSOVersion()<<std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (arguments.read("--openthreads-version-number"))
|
||||
{
|
||||
std::cout<<OpenThreadsGetVersion()<<std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (arguments.read("--openthreads-soversion-number"))
|
||||
{
|
||||
std::cout<<OpenThreadsGetSOVersion()<<std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::cout<<osgGetLibraryName()<< " "<< osgGetVersion()<<std::endl<<std::endl;
|
||||
|
||||
bool printContributors = false;
|
||||
|
||||
Reference in New Issue
Block a user