Add -Werror support for the regular Clang, not Apple's

Base modules already work and produce no warnings.

Change-Id: I932d7aaecbe3404f180e185bf1e9fff4d488a05d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Thiago Macieira 2013-09-09 16:20:37 -07:00 committed by The Qt Project
parent 6714196f45
commit d82ec6a168

View File

@ -28,10 +28,14 @@ warnings_are_errors:warning_clean {
# compiler.
clang {
# Apple clang 4.0-4.2
# Regular clang is not tested
ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
contains(ver, "4\\.[012]") {
# Regular clang 3.3 & 3.4
apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
reg_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
contains(apple_ver, "4\\.[012]")|contains(reg_ver, "3\\.[34]") {
QMAKE_CXXFLAGS += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR
# glibc's bswap_XX macros use the "register" keyword
linux: QMAKE_CXXFLAGS += -Wno-error=deprecated-register
}
} else:intel_icc:linux {
# Intel CC 13.0 - 14.0, on Linux only