diff options
Diffstat (limited to 'src/version.cpp')
-rw-r--r-- | src/version.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/version.cpp b/src/version.cpp new file mode 100644 index 00000000..b40196ff --- /dev/null +++ b/src/version.cpp @@ -0,0 +1,37 @@ +/* + * MRustC - Rust Compiler + * - By John Hodge (Mutabah/thePowersGang) + * + * version.cpp + * - Compiler version number + */ +#include <version.hpp> +#include <sstream> + +#define VERSION_MAJOR 0 +#define VERSION_MINOR 8 +#define VERSION_PATCH 0 + +#ifdef _WIN32 +# define VERSION_GIT_ISDIRTY 1 +# define VERSION_GIT_FULLHASH "" +# define VERSION_GIT_SHORTHASH "" +# define VERSION_BUILDTIME "" +# define VERSION_GIT_BRANCH "" +#endif + +unsigned int giVersion_Major = VERSION_MAJOR; +unsigned int giVersion_Minor = VERSION_MINOR; +unsigned int giVersion_Patch = VERSION_PATCH; +bool gbVersion_GitDirty = VERSION_GIT_ISDIRTY; +const char* gsVersion_GitHash = VERSION_GIT_FULLHASH; +const char* gsVersion_GitShortHash = VERSION_GIT_SHORTHASH; +const char* gsVersion_BuildTime = VERSION_BUILDTIME; + + +::std::string Version_GetString() +{ + ::std::stringstream ss; + ss << "v" << VERSION_MAJOR << "." << VERSION_MINOR << "." << VERSION_PATCH << " " << VERSION_GIT_BRANCH << ":" << VERSION_GIT_SHORTHASH; + return ss.str(); +} |