diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-25 20:19:44 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-25 20:19:44 +0900 |
commit | 1b7bf10fea3dc395e8d43b16c39e6b0ac231e366 (patch) | |
tree | 6b20b1476077017e6c101ae742eb562bf24af20d | |
parent | 72ac40aec4685781d8d669cb69a70c6baf167500 (diff) | |
download | libquotient-1b7bf10fea3dc395e8d43b16c39e6b0ac231e366.tar.gz libquotient-1b7bf10fea3dc395e8d43b16c39e6b0ac231e366.zip |
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).
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | 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 |