diff options
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 |