From b4ba18afe7ba0c4a91a24d99d21f6ff9439e896f Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Sun, 27 Jul 2014 23:36:40 +0200 Subject: [PATCH] Include revision number in the "version" command line option (Closes #1711) --- apps/openmw/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index adde408b9e..0aa7634077 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -184,6 +184,14 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat if (variables.count ("version")) { std::cout << "OpenMW version " << OPENMW_VERSION << std::endl; + + std::string rev = OPENMW_VERSION_COMMITHASH; + std::string tag = OPENMW_VERSION_TAGHASH; + if (!rev.empty() && !tag.empty()) + { + rev = rev.substr(0, 10); + std::cout << "Revision " << rev << std::endl; + } run = false; }