From d97f4b67e0b18d0ae6e189adb2ac488496fa468d Mon Sep 17 00:00:00 2001 From: lordmulder Date: Sat, 20 Nov 2010 22:14:29 +0100 Subject: [PATCH] Better compiler identification. --- src/Global.cpp | 16 ++++++++++++++++ src/Global.h | 1 + 2 files changed, 17 insertions(+) diff --git a/src/Global.cpp b/src/Global.cpp index 7715452f..992c7855 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -87,6 +87,21 @@ static QDate g_lamexp_version_date; static const char *g_lamexp_months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; static const char *g_lamexp_version_raw_date = __DATE__; +//Compiler version +#if _MSC_VER == 1400 + static const char *g_lamexp_version_compiler = "MSVC 8.0"; +#else + #if _MSC_VER == 1500 + static const char *g_lamexp_version_compiler = "MSVC 9.0"; + #else + #if _MSC_VER == 1600 + static const char *g_lamexp_version_compiler = "MSVC 10.0"; + #else + static const char *g_lamexp_version_compiler = "UNKNOWN"; + #endif + #endif +#endif + //Tool versions (expected) static const unsigned int g_lamexp_toolver_neroaac = VER_LAMEXP_TOOL_NEROAAC; @@ -122,6 +137,7 @@ unsigned int lamexp_version_major(void) { return g_lamexp_version_major; } unsigned int lamexp_version_minor(void) { return g_lamexp_version_minor; } unsigned int lamexp_version_build(void) { return g_lamexp_version_build; } const char *lamexp_version_release(void) { return g_lamexp_version_release; } +const char *lamexp_version_compiler(void) {return g_lamexp_version_compiler; } unsigned int lamexp_toolver_neroaac(void) { return g_lamexp_toolver_neroaac; } bool lamexp_version_demo(void) diff --git a/src/Global.h b/src/Global.h index 393f5609..bff555db 100644 --- a/src/Global.h +++ b/src/Global.h @@ -60,6 +60,7 @@ unsigned int lamexp_version_build(void); const QDate &lamexp_version_date(void); const char *lamexp_version_release(void); bool lamexp_version_demo(void); +const char *lamexp_version_compiler(void); unsigned int lamexp_toolver_neroaac(void); //Public functions