From 1b7bf10fea3dc395e8d43b16c39e6b0ac231e366 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 25 Dec 2017 20:19:44 +0900 Subject: Polished warnings configuration The whole thing should go without or almost without warnings with GCC and with Clang (MSVC is another story and I don't care about it much). --- CMakeLists.txt | 6 +++--- libqmatrixclient.pri | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7750b7ad..6526fbfd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,15 +18,15 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) "MinSizeRel" "RelWithDebInfo") endif() -foreach (FLAG all pedantic error=return-type) +set(CMAKE_CXX_STANDARD 14) + +foreach (FLAG all pedantic extra error=return-type no-unused-parameter no-gnu-zero-variadic-macro-arguments) CHECK_CXX_COMPILER_FLAG("-W${FLAG}" WARN_${FLAG}_SUPPORTED) if ( WARN_${FLAG}_SUPPORTED AND NOT CMAKE_CXX_FLAGS MATCHES "(^| )-W?${FLAG}($| )") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W${FLAG}") endif () endforeach () -set(CMAKE_CXX_STANDARD 14) - find_package(Qt5 5.6 REQUIRED Network Gui) get_filename_component(Qt5_Prefix "${Qt5_DIR}/../../../.." ABSOLUTE) diff --git a/libqmatrixclient.pri b/libqmatrixclient.pri index 414e3c08..10476cc9 100644 --- a/libqmatrixclient.pri +++ b/libqmatrixclient.pri @@ -1,5 +1,6 @@ QT += network CONFIG += c++14 warn_on rtti_off +QMAKE_CXXFLAGS += -Wno-unused-parameter INCLUDEPATH += $$PWD -- cgit v1.2.3