Skip to content

Commit

Permalink
Merge pull request #508 from OPNA2608/add/qmake_werror_switch
Browse files Browse the repository at this point in the history
Make Werror optional for QMake
  • Loading branch information
rerrahkr committed May 12, 2024
2 parents 4b07bc6 + c0a7961 commit 3383ab0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions qmake/variables.pri
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ message("Qt is version" $$QT_VERSION)
msvc|clang|if(gcc:!intel_icc) {
msvc {
message("Configured compiler is MSVC")
CPP_WARNING_FLAGS += /W3 /WX
CPP_WARNING_FLAGS += /W3
!no_warnings_are_errors {
CPP_WARNING_FLAGS += /WX
}
CPP_WARNING_FLAGS += /utf-8
CPP_WARNING_FLAGS += /D_CRT_SECURE_NO_WARNINGS # non _s functions cause errors, cross-platform support for them is terrible
COMPILER_MAJOR_VERSION = $$QT_MSC_VER
Expand All @@ -44,7 +47,10 @@ msvc|clang|if(gcc:!intel_icc) {
}
else {
# Compiler is most likely GCC-ish
CPP_WARNING_FLAGS += -Wall -Wextra -Werror -pedantic -pedantic-errors
CPP_WARNING_FLAGS += -Wall -Wextra -pedantic
!no_warnings_are_errors {
CPP_WARNING_FLAGS += -Werror -pedantic-errors
}

clang {
defined(QMAKE_APPLE_CLANG_MAJOR_VERSION, var) {
Expand Down

0 comments on commit 3383ab0

Please sign in to comment.