Skip to content

Commit

Permalink
compiler.pri: disable warnings-as-errors when MSVC static analysis is…
Browse files Browse the repository at this point in the history
… enabled.
  • Loading branch information
mkrautz committed Dec 30, 2015
1 parent bb5ea5c commit 9652f7f
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions compiler.pri
Expand Up @@ -45,6 +45,18 @@ win32 {
error("The INCLUDE environment variable is not set. Are you not in a build environment?")
}

CONFIG(analyze) {
QMAKE_CFLAGS_DEBUG *= /analyze
QMAKE_CXXFLAGS_DEBUG *= /analyze
QMAKE_CFLAGS_RELEASE *= /analyze
QMAKE_CXXFLAGS_RELEASE *= /analyze

# Do not treat warnings as errors when
# running the static analyzer.
# Otherwise, we won't get very far!
CONFIG *= no-warnings-as-errors
}

!CONFIG(no-warnings-as-errors) {
QMAKE_CFLAGS *= -WX
QMAKE_CXXFLAGS *= -WX
Expand Down Expand Up @@ -104,12 +116,6 @@ win32 {
QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,6.00
}

CONFIG(analyze) {
QMAKE_CFLAGS_DEBUG *= /analyze
QMAKE_CXXFLAGS_DEBUG *= /analyze
QMAKE_CFLAGS_RELEASE *= /analyze
QMAKE_CXXFLAGS_RELEASE *= /analyze
}
DEFINES *= RESTRICT=
CONFIG(sse2) {
QMAKE_CFLAGS_RELEASE -= -arch:SSE
Expand Down

0 comments on commit 9652f7f

Please sign in to comment.