From 305cbe8acb392669165aa3a45e4043d62030bcbb Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 6 Aug 2016 19:18:25 +0300 Subject: [PATCH] Fixed warning.pri for CollectionTest and TranslationsTest libraries. --HG-- branch : develop --- src/test/CollectionTest/CollectionTest.pro | 17 +-- src/test/CollectionTest/warnings.pri | 104 ++++++++++-------- .../TranslationsTest/TranslationsTest.pro | 17 +-- src/test/TranslationsTest/warnings.pri | 104 ++++++++++-------- 4 files changed, 128 insertions(+), 114 deletions(-) diff --git a/src/test/CollectionTest/CollectionTest.pro b/src/test/CollectionTest/CollectionTest.pro index b5328e852..828633723 100644 --- a/src/test/CollectionTest/CollectionTest.pro +++ b/src/test/CollectionTest/CollectionTest.pro @@ -50,16 +50,9 @@ HEADERS += \ # Set using ccache. Function enable_ccache() defined in common.pri. $$enable_ccache() -CONFIG(debug, debug|release){ - # Debug mode - unix { - include(warnings.pri) - } else { - *-g++{ - QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - } - } -}else{ +include(warnings.pri) + +CONFIG(release, debug|release){ # Release mode !win32-msvc*:CONFIG += silent DEFINES += V_NO_ASSERT @@ -67,10 +60,6 @@ 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/CollectionTest/warnings.pri b/src/test/CollectionTest/warnings.pri index 3d7b19eed..28c3e2d23 100644 --- a/src/test/CollectionTest/warnings.pri +++ b/src/test/CollectionTest/warnings.pri @@ -1,49 +1,67 @@ #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. +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 + 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 + } } - 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 + 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 + } + } +} 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 + } + } + + win32-msvc*{ + QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -WX + } } } diff --git a/src/test/TranslationsTest/TranslationsTest.pro b/src/test/TranslationsTest/TranslationsTest.pro index a74797712..1176a5293 100644 --- a/src/test/TranslationsTest/TranslationsTest.pro +++ b/src/test/TranslationsTest/TranslationsTest.pro @@ -54,16 +54,9 @@ $$enable_ccache() DEFINES += TS_DIR=\\\"$${PWD}/../../../share/translations\\\" -CONFIG(debug, debug|release){ - # Debug mode - unix { - include(warnings.pri) - } else { - *-g++{ - QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. - } - } -}else{ +include(warnings.pri) + +CONFIG(release, debug|release){ # Release mode !win32-msvc*:CONFIG += silent DEFINES += V_NO_ASSERT @@ -71,10 +64,6 @@ 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/TranslationsTest/warnings.pri b/src/test/TranslationsTest/warnings.pri index 3d7b19eed..28c3e2d23 100644 --- a/src/test/TranslationsTest/warnings.pri +++ b/src/test/TranslationsTest/warnings.pri @@ -1,49 +1,67 @@ #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. +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 + 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 + } } - 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 + 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 + } + } +} 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 + } + } + + win32-msvc*{ + QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -WX + } } }