summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/Main.cpp')
-rw-r--r--cpp/src/slice2cpp/Main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp
index 16633aa5531..21575b54eb3 100644
--- a/cpp/src/slice2cpp/Main.cpp
+++ b/cpp/src/slice2cpp/Main.cpp
@@ -21,6 +21,7 @@ usage(const char* n)
cerr <<
"Options:\n"
"-h, --help Show this message.\n"
+"-v, --version Display the Ice version.\n"
"-DNAME Define NAME as 1.\n"
"-DNAME=DEF Define NAME as DEF.\n"
"-UNAME Remove any definition for NAME.\n"
@@ -72,6 +73,12 @@ main(int argc, char* argv[])
usage(argv[0]);
return EXIT_SUCCESS;
}
+ else if(strcmp(argv[idx], "-v") == 0 ||
+ strcmp(argv[idx], "--version") == 0)
+ {
+ cout << ICE_STRING_VERSION << endl;
+ return EXIT_SUCCESS;
+ }
else if(strcmp(argv[idx], "-d") == 0 ||
strcmp(argv[idx], "--debug") == 0)
{