From 896cf7a03bbe57d276c190c82ec501132bfa80a1 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 27 May 2017 15:47:04 +0200 Subject: [PATCH] Add werr flag to bail on error Add more specific warning flags Add .clang-format symlinks to each source folder --- chatterino.pro | 12 ++++++++++++ messages/.clang-format | 1 + twitch/.clang-format | 1 + util/.clang-format | 1 + widgets/.clang-format | 1 + 5 files changed, 16 insertions(+) create mode 120000 messages/.clang-format create mode 120000 twitch/.clang-format create mode 120000 util/.clang-format create mode 120000 widgets/.clang-format diff --git a/chatterino.pro b/chatterino.pro index 9cab5091e..3c8488cfd 100644 --- a/chatterino.pro +++ b/chatterino.pro @@ -19,6 +19,12 @@ TEMPLATE = app DEFINES += QT_DEPRECATED_WARNINGS DEFINES += IRC_NAMESPACE=Communi +# Define warning flags for Chatterino +QMAKE_CXXFLAGS_WARN_ON = -Wall +QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function +QMAKE_CXXFLAGS_WARN_ON += -Wno-switch +QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations + # do not use windows min/max macros win32 { DEFINES += NOMINMAX @@ -166,3 +172,9 @@ macx { FORMS += \ forms/accountpopupform.ui + +werr { + QMAKE_CXXFLAGS += -Werror + + message("Enabling error on warning") +} diff --git a/messages/.clang-format b/messages/.clang-format new file mode 120000 index 000000000..7cab60ce3 --- /dev/null +++ b/messages/.clang-format @@ -0,0 +1 @@ +../.clang-format \ No newline at end of file diff --git a/twitch/.clang-format b/twitch/.clang-format new file mode 120000 index 000000000..7cab60ce3 --- /dev/null +++ b/twitch/.clang-format @@ -0,0 +1 @@ +../.clang-format \ No newline at end of file diff --git a/util/.clang-format b/util/.clang-format new file mode 120000 index 000000000..7cab60ce3 --- /dev/null +++ b/util/.clang-format @@ -0,0 +1 @@ +../.clang-format \ No newline at end of file diff --git a/widgets/.clang-format b/widgets/.clang-format new file mode 120000 index 000000000..7cab60ce3 --- /dev/null +++ b/widgets/.clang-format @@ -0,0 +1 @@ +../.clang-format \ No newline at end of file