diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-09-13 22:17:33 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-21 02:44:22 +0200 |
commit | fff5a8f9c987e5e285b2665c4d0a1c5bbe3e6276 (patch) | |
tree | d7db5fc49dd07731a0014a10de2c94f425fc023f /mkspecs/features/spec_post.prf | |
parent | 38832db576b3dbe629f85a6e64431f92ee2f48bc (diff) |
make qmakespecs announce the compiler family
on the way to eliminate scoping based on the spec.
gcc and msvc go as such into CONFIG, the other ones get the vendor
prefixed, as most are mostly unknown and thus likely to clash with
users' flags.
Change-Id: Ie622f53d90e96dbf05ce7d8c638cd355f04fa20c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'mkspecs/features/spec_post.prf')
-rw-r--r-- | mkspecs/features/spec_post.prf | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mkspecs/features/spec_post.prf b/mkspecs/features/spec_post.prf index fcc7314ce5..3af6bbd36a 100644 --- a/mkspecs/features/spec_post.prf +++ b/mkspecs/features/spec_post.prf @@ -29,3 +29,18 @@ isEmpty(QMAKE_PLATFORM) { error("Qmake spec sets an invalid TARGET_PLATFORM.") } CONFIG += $$QMAKE_PLATFORM + +isEmpty(QMAKE_COMPILER) { + *-g++*: \ + QMAKE_COMPILER = gcc + else:*-llvm*: \ + QMAKE_COMPILER = gcc llvm + else:*-clang*: \ + QMAKE_COMPILER = clang llvm + else:*-msvc*: \ + QMAKE_COMPILER = msvc + else: \ + error("qmake spec does not announce the compiler family, and it cannot be guessed.") + warning("qmake spec does not announce the compiler family. Guessed $$QMAKE_COMPILER.") +} +CONFIG += $$QMAKE_COMPILER |