2016-07-20 14:40:33 +02:00
|
|
|
|
#Turn on compilers warnings.
|
2016-07-29 20:04:53 +02:00
|
|
|
|
unix {
|
|
|
|
|
*-g++{
|
|
|
|
|
QMAKE_CXXFLAGS += \
|
|
|
|
|
# Key -isystem disable checking errors in system headers.
|
|
|
|
|
-isystem "$${OUT_PWD}/$${UI_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
|
|
|
|
|
$$GCC_DEBUG_CXXFLAGS # See common.pri for more details.
|
|
|
|
|
|
|
|
|
|
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
|
|
|
|
|
QMAKE_CXXFLAGS += -Werror
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
noAddressSanitizer{ # For enable run qmake with CONFIG+=noAddressSanitizer
|
|
|
|
|
# do nothing
|
|
|
|
|
} else {
|
|
|
|
|
#gcc’s 4.8.0 Address Sanitizer
|
|
|
|
|
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/
|
|
|
|
|
QMAKE_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
|
|
|
|
QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
|
|
|
|
QMAKE_LFLAGS += -fsanitize=address
|
|
|
|
|
}
|
2016-07-20 14:40:33 +02:00
|
|
|
|
}
|
|
|
|
|
|
2016-07-29 20:04:53 +02:00
|
|
|
|
clang*{
|
|
|
|
|
QMAKE_CXXFLAGS += \
|
|
|
|
|
# Key -isystem disable checking errors in system headers.
|
|
|
|
|
-isystem "$${OUT_PWD}/$${UI_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
|
|
|
|
|
$$CLANG_DEBUG_CXXFLAGS \ # See common.pri for more details.
|
|
|
|
|
-Wno-gnu-zero-variadic-macro-arguments\ # See macros QSKIP
|
|
|
|
|
|
|
|
|
|
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
|
|
|
|
|
QMAKE_CXXFLAGS += -Werror
|
|
|
|
|
}
|
2016-07-20 14:40:33 +02:00
|
|
|
|
}
|
|
|
|
|
|
2016-07-29 20:04:53 +02:00
|
|
|
|
*-icc-*{
|
|
|
|
|
QMAKE_CXXFLAGS += \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${UI_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
|
|
|
|
|
$$ICC_DEBUG_CXXFLAGS
|
|
|
|
|
|
|
|
|
|
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
|
|
|
|
|
QMAKE_CXXFLAGS += -Werror
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else { # Windows
|
|
|
|
|
*-g++{
|
|
|
|
|
QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details.
|
|
|
|
|
|
|
|
|
|
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
|
|
|
|
|
QMAKE_CXXFLAGS += -Werror
|
|
|
|
|
}
|
2016-07-20 14:40:33 +02:00
|
|
|
|
}
|
|
|
|
|
|
2016-07-29 20:04:53 +02:00
|
|
|
|
win32-msvc*{
|
|
|
|
|
QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details.
|
2016-07-20 14:40:33 +02:00
|
|
|
|
|
2016-07-29 20:04:53 +02:00
|
|
|
|
checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings
|
|
|
|
|
#QMAKE_CXXFLAGS += -WX
|
|
|
|
|
}
|
2016-07-20 14:40:33 +02:00
|
|
|
|
}
|
|
|
|
|
}
|