"version" command I tried to make it be more helpful by identifying the compiler that was used to build it, and also identifying any optimizations (or lack of) that were used during the compile process.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3184 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2009-04-19 05:01:55 +00:00
parent c889ac9225
commit 812ae15aaf
1 changed files with 74 additions and 0 deletions

View File

@ -2713,12 +2713,86 @@ void COM_Version_f (void)
Con_TPrintf (TL_EXEDATETIME, __DATE__, __TIME__);
#ifdef _DEBUG
Con_Printf("debug build\n");
#endif
#ifdef CLIENTONLY
Con_Printf("client-only build\n");
#endif
#ifdef SERVERONLY
Con_Printf("dedicated server build\n");
#endif
#ifdef __MINGW32__
Con_Printf("Compiled with MinGW version: %i.%i\n",__MINGW32_MAJOR_VERSION, __MINGW32_MINOR_VERSION);
#endif
#ifdef __CYGWIN__
Con_Printf("Compiled with Cygwin\n");
#endif
#ifdef __GNUC__
Con_Printf("Compiled with GCC version: %i.%i.%i (%i)\n",__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__, __VERSION__);
#ifdef __OPTIMIZE__
#ifdef __OPTIMIZE_SIZE__
Con_Printf("Optimized for size\n");
#else
Con_Printf("Optimized for speed\n");
#endif
#endif
#ifdef __NO_INLINE__
Con_Printf("GCC Optimization: Functions currently not inlined into their callers\n");
#else
Con_Printf("GCC Optimization: Functions currently inlined into their callers\n");
#endif
#endif
#ifdef _M_IX86
Con_Printf("x86 optimized for: ");
if (_M_IX86 == 600) { Con_Printf("Pentium Pro, Pentium II and Pentium III"); }
else if (_M_IX86 == 500) { Con_Printf("Pentium"); }
else if (_M_IX86 == 400) { Con_Printf("486"); }
else if (_M_IX86 == 300) { Con_Printf("386"); }
else
{
Con_Printf("Unknown (%i)\n",_M_IX86);
}
Con_Printf("\n");
#endif
#ifdef _M_IX86_FP
if (_M_IX86_FP == 0) { Con_Printf("SSE & SSE2 instructions disabled\n"); }
else if (_M_IX86_FP == 1) { Con_Printf("SSE instructions enabled\n"); }
else if (_M_IX86_FP == 2) { Con_Printf("SSE2 instructions enabled\n"); }
else
{
Con_Printf("Unknown Arch specified: %i\n",_M_IX86_FP);
}
#endif
#ifdef _MSC_VER
if (_MSC_VER == 600) { Con_Printf("C Compiler version 6.0\n"); }
else if (_MSC_VER == 700) { Con_Printf("C/C++ compiler version 7.0\n"); }
else if (_MSC_VER == 800) { Con_Printf("Visual C++, Windows, version 1.0 or Visual C++, 32-bit, version 1.0\n"); }
else if (_MSC_VER == 900) { Con_Printf("Visual C++, Windows, version 2.0 or Visual C++, 32-bit, version 2.x\n"); }
else if (_MSC_VER == 1000) { Con_Printf("Visual C++, 32-bit, version 4.0\n"); }
else if (_MSC_VER == 1020) { Con_Printf("Visual C++, 32-bit, version 4.2\n"); }
else if (_MSC_VER == 1100) { Con_Printf("Visual C++, 32-bit, version 5.0\n"); }
else if (_MSC_VER == 1200) { Con_Printf("Visual C++, 32-bit, version 6.0\n"); }
else if (_MSC_VER == 1300) { Con_Printf("Visual C++, version 7.0\n"); }
else if (_MSC_VER == 1310) { Con_Printf("Visual C++ 2003, version 7.1\n"); }
else if (_MSC_VER == 1400) { Con_Printf("Visual C++ 2005, version 8.0\n"); }
else if (_MSC_VER == 1500) { Con_Printf("Visual C++ 2008, version 9.0\n"); }
else
{
Con_Printf("Unknown Microsoft C++ compiler: %i %i %i \n",_MSC_VER, _MSC_FULL_VER, _MSC_BUILD);
}
#endif
}
/*