Last active
October 27, 2022 15:24
-
-
Save esutton/b5939f32ac13df551746db076a64980d to your computer and use it in GitHub Desktop.
Qt qmake project file flags to add
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Qt qmake project file | |
# Need c++11 to use nullptr ( GCC 4.7 added C++11 ) | |
CONFIG += c++11 | |
# Use the compiler - Turn on *everything* you can | |
# Always use -Werror else warnings mean nothing after awhile | |
QMAKE_CXXFLAGS += -Wall | |
QMAKE_CXXFLAGS += -Werror | |
QMAKE_CXXFLAGS += -Wextra | |
QMAKE_CXXFLAGS += -pedantic | |
QMAKE_CXXFLAGS += -Wcast-qual | |
QMAKE_CXXFLAGS += -Wfloat-equal | |
QMAKE_CXXFLAGS += -Winit-self | |
QMAKE_CXXFLAGS += -Wlogical-op | |
QMAKE_CXXFLAGS += -Wmissing-declarations | |
QMAKE_CXXFLAGS += -Wno-unused | |
QMAKE_CXXFLAGS += -Woverloaded-virtual | |
QMAKE_CXXFLAGS += -Wpedantic | |
QMAKE_CXXFLAGS += -Wredundant-decls | |
QMAKE_CXXFLAGS += -Wshadow | |
QMAKE_CXXFLAGS += -Wstrict-null-sentinel | |
QMAKE_CXXFLAGS += -Wundef | |
QMAKE_CXXFLAGS += -Wunreachable-code | |
QMAKE_CXXFLAGS += -Wzero-as-null-pointer-constant | |
# Qt has many problems with these warnings | |
# I guess I could push and pop warnings around all Qt includes | |
# ***************************************** | |
# QMAKE_CXXFLAGS += -Wcast-align | |
# QMAKE_CXXFLAGS += -Wctor-dtor-privacy | |
# QMAKE_CXXFLAGS += -Weffc++ | |
# QMAKE_CXXFLAGS += -Wnoexcept | |
# QMAKE_CXXFLAGS += -Wsign-conversion | |
# QMAKE_CXXFLAGS += -Wsign-promo | |
# QMAKE_CXXFLAGS += -Wswitch-default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment