mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
CXX flags: Promote warnings about missing branches in enum-based switches as errors
This commit is contained in:
parent
c6291dd2e6
commit
d22c115925
@ -7,11 +7,17 @@ CONFIG += c++17
|
|||||||
win32 {
|
win32 {
|
||||||
#enable c++17 explicitly in msvc
|
#enable c++17 explicitly in msvc
|
||||||
QMAKE_CXXFLAGS += /std:c++17 /Zc:__cplusplus /permissive-
|
QMAKE_CXXFLAGS += /std:c++17 /Zc:__cplusplus /permissive-
|
||||||
|
#treat missing branches for enums as error
|
||||||
|
QMAKE_CXXFLAGS += /we4061
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINES += NOMINMAX
|
DEFINES += NOMINMAX
|
||||||
|
|
||||||
if(unix|mingw):QMAKE_CXXFLAGS_RELEASE += -DNDEBUG
|
if(unix|mingw) {
|
||||||
|
QMAKE_CXXFLAGS_RELEASE += -DNDEBUG
|
||||||
|
#treat missing branches for enums as error
|
||||||
|
QMAKE_CXXFLAGS += -Werror=switch
|
||||||
|
}
|
||||||
win32:msvc:QMAKE_CXXFLAGS_RELEASE += /DNDEBUG
|
win32:msvc:QMAKE_CXXFLAGS_RELEASE += /DNDEBUG
|
||||||
|
|
||||||
# check Qt version
|
# check Qt version
|
||||||
|
Loading…
Reference in New Issue
Block a user