diff --git a/src/app/tape/tape.pro b/src/app/tape/tape.pro index 75325edc0..cbe7f04af 100644 --- a/src/app/tape/tape.pro +++ b/src/app/tape/tape.pro @@ -257,46 +257,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-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. - - 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 - } - } - 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. - - # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and - # want them in global list. Compromise decision delete them from local list. - QMAKE_CXXFLAGS -= \ - -Wundefined-reinterpret-cast \ - -Wmissing-prototypes # rcc folder - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${UI_DIR}" \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${RCC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -311,6 +272,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols DEFINES += V_NO_DEBUG } else { diff --git a/src/app/tape/warnings.pri b/src/app/tape/warnings.pri new file mode 100644 index 000000000..9a4697481 --- /dev/null +++ b/src/app/tape/warnings.pri @@ -0,0 +1,54 @@ +#Turn on compilers warnings. +*-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 + } +} + +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. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wundefined-reinterpret-cast \ + -Wmissing-prototypes # rcc folder +} + +*-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 + } +} diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index ede57e369..7c2a33e5c 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -67,52 +67,10 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-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}" \ - -isystem "$${OUT_PWD}/../../libs/vtools/$${UI_DIR}" \ # For VTools UI files - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - 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}" \ - -isystem "$${OUT_PWD}/../../libs/vtools/$${UI_DIR}" \ # For VTools UI files - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - - # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and - # want them in global list. Compromise decision delete them from local list. - QMAKE_CXXFLAGS -= \ - -Wmissing-prototypes \ - -Wundefined-reinterpret-cast - } - *-icc-*{ - QMAKE_CXXFLAGS+= \ - -isystem "$${OUT_PWD}/$${UI_DIR}" \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${RCC_DIR}" \ - -isystem "$${OUT_PWD}/../../libs/vtools/$${UI_DIR}" \ # For VTools UI files - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ - QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. + QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. } } @@ -128,6 +86,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols DEFINES += V_NO_DEBUG } else { diff --git a/src/app/valentina/warnings.pri b/src/app/valentina/warnings.pri new file mode 100644 index 000000000..2e87a116f --- /dev/null +++ b/src/app/valentina/warnings.pri @@ -0,0 +1,57 @@ +#Turn on compilers warnings. +*-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}" \ + -isystem "$${OUT_PWD}/../../libs/vtools/$${UI_DIR}" \ # For VTools UI files + $$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 + } +} + +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}" \ + -isystem "$${OUT_PWD}/../../libs/vtools/$${UI_DIR}" \ # For VTools UI files + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wmissing-prototypes \ + -Wundefined-reinterpret-cast +} + +*-icc-*{ + QMAKE_CXXFLAGS+= \ + -isystem "$${OUT_PWD}/$${UI_DIR}" \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + -isystem "$${OUT_PWD}/../../libs/vtools/$${UI_DIR}" \ # For VTools UI files + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/fervor/fervor.pro b/src/libs/fervor/fervor.pro index 7281ebb51..63eaae37e 100644 --- a/src/libs/fervor/fervor.pro +++ b/src/libs/fervor/fervor.pro @@ -48,37 +48,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${UI_DIR}" \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${UI_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${UI_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -93,6 +63,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/libs/fervor/warnings.pri b/src/libs/fervor/warnings.pri new file mode 100644 index 000000000..8bd738583 --- /dev/null +++ b/src/libs/fervor/warnings.pri @@ -0,0 +1,45 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${UI_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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${UI_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${UI_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/ifc/ifc.pro b/src/libs/ifc/ifc.pro index aa213c227..b115a0547 100644 --- a/src/libs/ifc/ifc.pro +++ b/src/libs/ifc/ifc.pro @@ -56,43 +56,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${RCC_DIR}" \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${RCC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - - # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and - # want them in global list. Compromise decision delete them from local list. - QMAKE_CXXFLAGS -= \ - -Wmissing-prototypes \ - -Wundefined-reinterpret-cast - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${RCC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -107,6 +71,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/libs/ifc/warnings.pri b/src/libs/ifc/warnings.pri new file mode 100644 index 000000000..be993a88e --- /dev/null +++ b/src/libs/ifc/warnings.pri @@ -0,0 +1,51 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wmissing-prototypes \ + -Wundefined-reinterpret-cast +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/qmuparser/qmuparser.pro b/src/libs/qmuparser/qmuparser.pro index 026c57a4f..3982eeb7b 100644 --- a/src/libs/qmuparser/qmuparser.pro +++ b/src/libs/qmuparser/qmuparser.pro @@ -65,34 +65,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -107,6 +80,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noStripDebugSymbols { # do nothing } else { diff --git a/src/libs/qmuparser/warnings.pri b/src/libs/qmuparser/warnings.pri new file mode 100644 index 000000000..5e56557c8 --- /dev/null +++ b/src/libs/qmuparser/warnings.pri @@ -0,0 +1,42 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/vdxf/vdxf.pro b/src/libs/vdxf/vdxf.pro index 7155fcaf7..311cf10bc 100644 --- a/src/libs/vdxf/vdxf.pro +++ b/src/libs/vdxf/vdxf.pro @@ -43,34 +43,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -85,6 +58,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/libs/vdxf/warnings.pri b/src/libs/vdxf/warnings.pri new file mode 100644 index 000000000..5e56557c8 --- /dev/null +++ b/src/libs/vdxf/warnings.pri @@ -0,0 +1,42 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/vformat/vformat.pro b/src/libs/vformat/vformat.pro index e75fc6c3d..3c62a9720 100644 --- a/src/libs/vformat/vformat.pro +++ b/src/libs/vformat/vformat.pro @@ -49,34 +49,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -91,6 +64,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/libs/vformat/warnings.pri b/src/libs/vformat/warnings.pri new file mode 100644 index 000000000..5e56557c8 --- /dev/null +++ b/src/libs/vformat/warnings.pri @@ -0,0 +1,42 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/vgeometry/vgeometry.pro b/src/libs/vgeometry/vgeometry.pro index 327e1d802..524c6379f 100644 --- a/src/libs/vgeometry/vgeometry.pro +++ b/src/libs/vgeometry/vgeometry.pro @@ -45,34 +45,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -87,6 +60,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/libs/vgeometry/warnings.pri b/src/libs/vgeometry/warnings.pri new file mode 100644 index 000000000..5e56557c8 --- /dev/null +++ b/src/libs/vgeometry/warnings.pri @@ -0,0 +1,42 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/vlayout/vlayout.pro b/src/libs/vlayout/vlayout.pro index 5380d9df3..0a77c8638 100644 --- a/src/libs/vlayout/vlayout.pro +++ b/src/libs/vlayout/vlayout.pro @@ -48,48 +48,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${RCC_DIR}" \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and - # want them in the global list. Compromise decision is to delete them from the local list. - QMAKE_CXXFLAGS -= \ - -Wlong-long \ - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${RCC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - - # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and - # want them in global list. Compromise decision delete them from local list. - QMAKE_CXXFLAGS -= \ - -Wundefined-reinterpret-cast \ - -Wmissing-prototypes # rcc folder - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${RCC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -104,6 +63,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + QMAKE_CXXFLAGS -= -O2 # Disable default optimization level QMAKE_CXXFLAGS += -O3 # For vlayout library enable speed optimizations diff --git a/src/libs/vlayout/warnings.pri b/src/libs/vlayout/warnings.pri new file mode 100644 index 000000000..a3e5bcdf5 --- /dev/null +++ b/src/libs/vlayout/warnings.pri @@ -0,0 +1,56 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -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 + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and + # want them in the global list. Compromise decision is to delete them from the local list. + QMAKE_CXXFLAGS -= \ + -Wlong-long \ + + 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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wundefined-reinterpret-cast \ + -Wmissing-prototypes # rcc folder +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/vmisc/vmisc.pro b/src/libs/vmisc/vmisc.pro index df48dc12d..3f5ccb29b 100644 --- a/src/libs/vmisc/vmisc.pro +++ b/src/libs/vmisc/vmisc.pro @@ -51,39 +51,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - - # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and - # want them in global list. Compromise decision delete them from local list. - QMAKE_CXXFLAGS -= \ - -Wmissing-prototypes - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -102,6 +70,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/libs/vmisc/warnings.pri b/src/libs/vmisc/warnings.pri new file mode 100644 index 000000000..e94434007 --- /dev/null +++ b/src/libs/vmisc/warnings.pri @@ -0,0 +1,47 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wmissing-prototypes +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/vobj/vobj.pro b/src/libs/vobj/vobj.pro index 7008b2559..bee46b371 100644 --- a/src/libs/vobj/vobj.pro +++ b/src/libs/vobj/vobj.pro @@ -43,34 +43,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -85,6 +58,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/libs/vobj/warnings.pri b/src/libs/vobj/warnings.pri new file mode 100644 index 000000000..5e56557c8 --- /dev/null +++ b/src/libs/vobj/warnings.pri @@ -0,0 +1,42 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/vpatterndb/vpatterndb.pro b/src/libs/vpatterndb/vpatterndb.pro index 28d254840..9460a67d6 100644 --- a/src/libs/vpatterndb/vpatterndb.pro +++ b/src/libs/vpatterndb/vpatterndb.pro @@ -46,34 +46,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -88,6 +61,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/libs/vpatterndb/warnings.pri b/src/libs/vpatterndb/warnings.pri new file mode 100644 index 000000000..5e56557c8 --- /dev/null +++ b/src/libs/vpatterndb/warnings.pri @@ -0,0 +1,42 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/vpropertyexplorer/vpropertyexplorer.pro b/src/libs/vpropertyexplorer/vpropertyexplorer.pro index 36302808b..a5eff9e62 100644 --- a/src/libs/vpropertyexplorer/vpropertyexplorer.pro +++ b/src/libs/vpropertyexplorer/vpropertyexplorer.pro @@ -63,45 +63,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - # Key -isystem disable checking errors in system headers. - $$GCC_DEBUG_CXXFLAGS \ # See common.pri for more details. - - # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and - # want them in global list. Compromise decision delete them from local list. - QMAKE_CXXFLAGS -= \ - -Wswitch-default - - 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 - } - } - - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - - # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and - # want them in global list. Compromise decision delete them from local list. - QMAKE_CXXFLAGS -= \ - -Wundefined-reinterpret-cast - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. @@ -116,6 +78,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + !macx:!win32-msvc*{ noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing diff --git a/src/libs/vpropertyexplorer/warnings.pri b/src/libs/vpropertyexplorer/warnings.pri new file mode 100644 index 000000000..fcf8e2aeb --- /dev/null +++ b/src/libs/vpropertyexplorer/warnings.pri @@ -0,0 +1,52 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + # Key -isystem disable checking errors in system headers. + $$GCC_DEBUG_CXXFLAGS \ # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wswitch-default + + 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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wundefined-reinterpret-cast +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/vtools/vtools.pro b/src/libs/vtools/vtools.pro index fe30de8e8..0041fa51d 100644 --- a/src/libs/vtools/vtools.pro +++ b/src/libs/vtools/vtools.pro @@ -53,42 +53,7 @@ INCLUDEPATH += $$PWD/../vpatterndb CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-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. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - - # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and - # want them in global list. Compromise decision delete them from local list. - QMAKE_CXXFLAGS -= \ - -Wundefined-reinterpret-cast - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${UI_DIR}" \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -103,6 +68,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/libs/vtools/warnings.pri b/src/libs/vtools/warnings.pri new file mode 100644 index 000000000..ac67d588c --- /dev/null +++ b/src/libs/vtools/warnings.pri @@ -0,0 +1,50 @@ +#Turn on compilers warnings. +*-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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wundefined-reinterpret-cast +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${UI_DIR}" \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/libs/vwidgets/vwidgets.pro b/src/libs/vwidgets/vwidgets.pro index 8eb426b73..8dd99831c 100644 --- a/src/libs/vwidgets/vwidgets.pro +++ b/src/libs/vwidgets/vwidgets.pro @@ -45,39 +45,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - # Key -isystem disable checking errors in system headers. - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - - # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and - # want them in global list. Compromise decision delete them from local list. - QMAKE_CXXFLAGS -= \ - -Wundefined-reinterpret-cast - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -92,6 +60,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/libs/vwidgets/warnings.pri b/src/libs/vwidgets/warnings.pri new file mode 100644 index 000000000..9c68dfe1c --- /dev/null +++ b/src/libs/vwidgets/warnings.pri @@ -0,0 +1,47 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wundefined-reinterpret-cast +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/test/ParserTest/ParserTest.pro b/src/test/ParserTest/ParserTest.pro index bd360e7f6..0a7a88068 100644 --- a/src/test/ParserTest/ParserTest.pro +++ b/src/test/ParserTest/ParserTest.pro @@ -51,34 +51,7 @@ $$enable_ccache() CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-g++{ - QMAKE_CXXFLAGS += \ - $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - - 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 - } - } - clang*{ - QMAKE_CXXFLAGS += \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. - - # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and - # want them in global list. Compromise decision delete them from local list. - QMAKE_CXXFLAGS -= \ - -Wmissing-prototypes - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -90,6 +63,10 @@ CONFIG(debug, debug|release){ !win32-msvc*:CONFIG += silent DEFINES += QT_NO_DEBUG_OUTPUT + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/test/ParserTest/warnings.pri b/src/test/ParserTest/warnings.pri new file mode 100644 index 000000000..9f37c06ac --- /dev/null +++ b/src/test/ParserTest/warnings.pri @@ -0,0 +1,42 @@ +#Turn on compilers warnings. +*-g++{ + QMAKE_CXXFLAGS += \ + $$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 + } +} + +clang*{ + QMAKE_CXXFLAGS += \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wmissing-prototypes +} + +*-icc-*{ + QMAKE_CXXFLAGS += \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } +} diff --git a/src/test/ValentinaTest/ValentinaTest.pro b/src/test/ValentinaTest/ValentinaTest.pro index 360fb8853..8c7272185 100644 --- a/src/test/ValentinaTest/ValentinaTest.pro +++ b/src/test/ValentinaTest/ValentinaTest.pro @@ -92,41 +92,7 @@ DEFINES += TS_DIR=\\\"$${PWD}/../../../share/translations\\\" CONFIG(debug, debug|release){ # Debug mode unix { - #Turn on compilers warnings. - *-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. - - 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 - } - } - 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 - } - *-icc-*{ - QMAKE_CXXFLAGS += \ - -isystem "$${OUT_PWD}/$${UI_DIR}" \ - -isystem "$${OUT_PWD}/$${MOC_DIR}" \ - -isystem "$${OUT_PWD}/$${RCC_DIR}" \ - $$ICC_DEBUG_CXXFLAGS - } + include(warnings.pri) } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. @@ -140,6 +106,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll } + checkWarnings{ + unix:include(warnings.pri) + } + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols # do nothing } else { diff --git a/src/test/ValentinaTest/warnings.pri b/src/test/ValentinaTest/warnings.pri new file mode 100644 index 000000000..3d7b19eed --- /dev/null +++ b/src/test/ValentinaTest/warnings.pri @@ -0,0 +1,49 @@ +#Turn on compilers warnings. +*-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 + } +} + +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 + } +} + +*-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 + } +}