source: trunk/Mars/mars-config.cc@ 18811

Last change on this file since 18811 was 9195, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 923 bytes
Line 
1#include <iostream>
2
3#include <string.h> // strcmp (Ubuntu 8.10)
4
5#include <RVersion.h>
6
7using namespace std;
8
9static void Usage()
10{
11 cout << endl;
12 cout << "Sorry the usage is:" << endl;
13 cout << " mars-config [--root-ver|--mars-ver]" << endl;
14 cout << endl;
15 cout << "Options:" << endl;
16 cout << " --root-ver Show root version which were used for compilation." << endl;
17 cout << " To be compared with the output of \"root-config --version\"" << endl;
18 cout << " --version Show mars version." << endl;
19 cout << endl;
20 cout << "Only one command line option is allowed." << endl;
21 cout << endl;
22}
23
24int main(int argc, char *const argv[])
25{
26 if (argc!=2)
27 {
28 Usage();
29 return 2;
30 }
31
32 if (!strcmp(argv[1], "--root-ver"))
33 cout << ROOT_RELEASE << endl;
34 if (!strcmp(argv[1], "--version"))
35 cout << MARSVER << endl;
36
37 return 0;
38}
Note: See TracBrowser for help on using the repository browser.