equal
deleted
inserted
replaced
|
1 # This functionality is opt-in via the STRICT environment variable |
|
2 # export STRICT=1 on Unix |
|
3 # set STRICT=1 on Windows |
|
4 STRICT=$$(STRICT) |
|
5 equals(STRICT,1) { |
|
6 win32 { |
|
7 QMAKE_CXXFLAGS+=-WX |
|
8 } else { |
|
9 QMAKE_CXXFLAGS+=-Werror |
|
10 QMAKE_CXXFLAGS+=-Wall |
|
11 # There are legitimate cases that conflict with this warning (QSensorFilter::filter) |
|
12 #QMAKE_CXXFLAGS+=-Woverloaded-virtual |
|
13 # This breaks in QML headers |
|
14 #QMAKE_CXXFLAGS+=-Wold-style-cast |
|
15 # This breaks in QML headers |
|
16 #QMAKE_CXXFLAGS+=-pedantic |
|
17 QMAKE_CXXFLAGS+=-ansi |
|
18 QMAKE_CXXFLAGS+=-Wno-long-long |
|
19 # This breaks in Qt headers |
|
20 #QMAKE_CXXFLAGS+=-Wshadow |
|
21 # This breaks everywhere |
|
22 #QMAKE_CXXFLAGS+=-Wunreachable-code |
|
23 QMAKE_CXXFLAGS+=-Wundef |
|
24 QMAKE_CXXFLAGS+=-Wformat-nonliteral |
|
25 QMAKE_CXXFLAGS+=-Wformat-security |
|
26 QMAKE_CXXFLAGS+=-Wcast-align |
|
27 QMAKE_CXXFLAGS+=-Wchar-subscripts |
|
28 # This breaks in Qt headers |
|
29 #QMAKE_CXXFLAGS+=-Wfloat-equal |
|
30 QMAKE_LFLAGS+=-Wl,-no-undefined |
|
31 } |
|
32 |
|
33 contains(TEMPLATE,lib) { |
|
34 DEFINES += QT_NO_CAST_FROM_ASCII |
|
35 CONFIG += no_keywords |
|
36 } |
|
37 } |
|
38 |