From 1b5271f27f7d5c6f814567d6d3bf211b41244cc8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 15 Dec 2016 16:20:27 +0100 Subject: determine compiler version at build time, not in configure this makes it consistent with the determination of the default include/library paths. this makes sense, as it's possible to switch the sdk/toolchain after building qt (within reason). a side effect of this change is that for compilers which emulate other compilers, both the real and the emulated version are now made available. Change-Id: Icfcc672c0d2e3d1b5e622993c366063d70ad327c Started-by: Thiago Macieira Reviewed-by: Lars Knoll --- mkspecs/features/data/macros.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 mkspecs/features/data/macros.cpp (limited to 'mkspecs/features/data') diff --git a/mkspecs/features/data/macros.cpp b/mkspecs/features/data/macros.cpp new file mode 100644 index 0000000000..88473fb980 --- /dev/null +++ b/mkspecs/features/data/macros.cpp @@ -0,0 +1,28 @@ +// Keep this file small. The pre-processed contents are eval'd by qmake. +#ifdef _MSC_VER +QMAKE_MSC_VER = _MSC_VER +QMAKE_MSC_FULL_VER = _MSC_FULL_VER +#endif +#ifdef __INTEL_COMPILER +QMAKE_ICC_VER = __INTEL_COMPILER +QMAKE_ICC_UPDATE_VER = __INTEL_COMPILER_UPDATE +#endif +#ifdef __APPLE_CC__ +QMAKE_APPLE_CC = __APPLE_CC__ +#endif +#ifdef __clang__ +#ifdef __APPLE_CC__ +QT_APPLE_CLANG_MAJOR_VERSION = __clang_major__ +QT_APPLE_CLANG_MINOR_VERSION = __clang_minor__ +QT_APPLE_CLANG_PATCH_VERSION = __clang_patchlevel__ +#else +QT_CLANG_MAJOR_VERSION = __clang_major__ +QT_CLANG_MINOR_VERSION = __clang_minor__ +QT_CLANG_PATCH_VERSION = __clang_patchlevel__ +#endif +#endif +#ifdef __GNUC__ +QT_GCC_MAJOR_VERSION = __GNUC__ +QT_GCC_MINOR_VERSION = __GNUC_MINOR__ +QT_GCC_PATCH_VERSION = __GNUC_PATCHLEVEL__ +#endif -- cgit v1.2.3