Add Clang detection and add BSD to the collected stats.

This was SVN commit r13111.
This commit is contained in:
leper 2013-01-23 16:01:17 +00:00
parent 684f117560
commit 3e8bdebc6d
2 changed files with 11 additions and 1 deletions

View File

@ -36,7 +36,7 @@
#else
# define MSC_VERSION 0
#endif
// .. ICC (VC-compatible)
// .. ICC (VC-compatible, GCC-compatible)
#if defined(__INTEL_COMPILER)
# define ICC_VERSION __INTEL_COMPILER
#else
@ -54,6 +54,14 @@
#else
# define GCC_VERSION 0
#endif
// .. Clang/LLVM (GCC-compatible)
// use Clang's feature checking macros to check for availability of features
// http://clang.llvm.org/docs/LanguageExtensions.html#feature-checking-macros
#ifdef __clang__
# define CLANG_VERSION (__clang_major__*100 + __clang_minor__)
#else
# define CLANG_VERSION 0
#endif
// are PreCompiled Headers supported?

View File

@ -198,6 +198,7 @@ void RunHardwareDetection()
scriptInterface.Eval("({})", settings);
scriptInterface.SetProperty(settings.get(), "os_unix", OS_UNIX);
scriptInterface.SetProperty(settings.get(), "os_bsd", OS_BSD);
scriptInterface.SetProperty(settings.get(), "os_linux", OS_LINUX);
scriptInterface.SetProperty(settings.get(), "os_android", OS_ANDROID);
scriptInterface.SetProperty(settings.get(), "os_macosx", OS_MACOSX);
@ -220,6 +221,7 @@ void RunHardwareDetection()
scriptInterface.SetProperty(settings.get(), "build_msc", (int)MSC_VERSION);
scriptInterface.SetProperty(settings.get(), "build_icc", (int)ICC_VERSION);
scriptInterface.SetProperty(settings.get(), "build_gcc", (int)GCC_VERSION);
scriptInterface.SetProperty(settings.get(), "build_clang", (int)CLANG_VERSION);
scriptInterface.SetProperty(settings.get(), "gfx_card", gfx::CardName());
scriptInterface.SetProperty(settings.get(), "gfx_drv_ver", gfx::DriverInfo());