From 7e1597531dad0cc0a6bbb59d7d4bcb187b3cb991 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Tue, 7 Sep 2021 19:13:10 +0200 Subject: [PATCH] Show version on run --- CMakeLists.txt | 5 ++++- src/main.cpp | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 89747ef..d487b5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,4 +38,7 @@ if (WINDOWS) if (SHARED) set_target_properties(PokemonScriptTester PROPERTIES SUFFIX ".exe") endif(SHARED) -endif (WINDOWS) \ No newline at end of file +endif (WINDOWS) + +INCLUDE(extern/gitversion/cmake.cmake) +TARGET_GIT_VERSION_INIT(PokemonScriptTester) \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 9ef758e..be91b4a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -9,8 +9,10 @@ #include "Tester/AngelScript/MiscMockFunctions.hpp" #include "Tester/AngelScript/TestFunctions.hpp" #include "Tester/TestRunner.hpp" +#include int main(int argc, char** argv) { + std::cout << "PokemonScript Tester version: " << version::VERSION_STRING << std::endl; args::ArgumentParser parser("PkmnLib Script Tester.", ""); args::HelpFlag help(parser, "help", "Display this help menu", {'h', "help"});