2015-04-27 14:44:27 +02:00
|
|
|
win32{
|
|
|
|
# Because "copy" doesn't support files that containe plus sign (+) in name we will use xcopy instead.
|
2015-10-24 08:49:46 +02:00
|
|
|
unset(QMAKE_COPY)
|
2015-04-27 14:44:27 +02:00
|
|
|
QMAKE_COPY = xcopy /y
|
2015-10-24 08:49:46 +02:00
|
|
|
|
|
|
|
unset(QMAKE_COPY_FILE)
|
|
|
|
QMAKE_COPY_FILE = xcopy /y
|
|
|
|
|
|
|
|
unset(QMAKE_INSTALL_FILE)
|
|
|
|
QMAKE_INSTALL_FILE = xcopy /y
|
|
|
|
|
|
|
|
unset(QMAKE_INSTALL_PROGRAM)
|
|
|
|
QMAKE_INSTALL_PROGRAM = xcopy /y
|
2015-04-27 14:44:27 +02:00
|
|
|
}
|
|
|
|
|
2015-12-03 21:08:01 +01:00
|
|
|
unix{
|
2021-09-25 06:43:41 +02:00
|
|
|
*g++* {
|
|
|
|
GCC_VERSION = $$system("g++ -dumpfullversion -dumpversion")
|
2021-09-25 19:12:15 +02:00
|
|
|
GCC_VERSIONS = $$split(GCC_VERSION, ".")
|
|
|
|
COMPILER_MAJOR_VERSION = $$member(GCC_VERSIONS, 0)
|
|
|
|
message("g++ version $${COMPILER_MAJOR_VERSION}.x found")
|
2021-09-25 06:43:41 +02:00
|
|
|
|
|
|
|
greaterThan(COMPILER_MAJOR_VERSION, 3):CONFIG += g++4
|
|
|
|
greaterThan(COMPILER_MAJOR_VERSION, 4):CONFIG += g++5
|
|
|
|
greaterThan(COMPILER_MAJOR_VERSION, 5):CONFIG += g++6
|
|
|
|
greaterThan(COMPILER_MAJOR_VERSION, 6):CONFIG += g++7
|
|
|
|
greaterThan(COMPILER_MAJOR_VERSION, 7):CONFIG += g++8
|
|
|
|
greaterThan(COMPILER_MAJOR_VERSION, 8):CONFIG += g++9
|
|
|
|
}
|
|
|
|
|
2015-12-03 21:08:01 +01:00
|
|
|
macx{
|
|
|
|
VCOPY = $$QMAKE_COPY
|
|
|
|
} else {
|
|
|
|
VCOPY = $$QMAKE_COPY -u
|
|
|
|
}
|
2020-07-11 09:52:53 +02:00
|
|
|
|
2020-07-13 15:07:45 +02:00
|
|
|
# Default prefix. Use for creation install path.
|
|
|
|
DEFAULT_PREFIX = /usr
|
|
|
|
|
2020-07-11 09:52:53 +02:00
|
|
|
# Prefix for binary file.
|
|
|
|
isEmpty(PREFIX){
|
|
|
|
PREFIX = $$DEFAULT_PREFIX
|
|
|
|
}
|
|
|
|
|
2020-07-13 15:07:45 +02:00
|
|
|
BINDIR = $$PREFIX/bin
|
2020-07-11 09:52:53 +02:00
|
|
|
DATADIR = $$PREFIX/share
|
|
|
|
PKGDATADIR = $$DATADIR/valentina
|
2020-07-13 15:07:45 +02:00
|
|
|
DEFINES += BINDIR=\\\"$$BINDIR\\\" DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
|
2015-12-03 21:08:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
win32{
|
|
|
|
VCOPY = $$QMAKE_COPY /D
|
|
|
|
}
|
|
|
|
|
2018-05-22 18:22:11 +02:00
|
|
|
macx{
|
|
|
|
# Check which minimal OSX version supports current Qt version
|
2022-11-19 17:40:18 +01:00
|
|
|
# See page https://doc.qt.io/qt-5/supported-platforms.html
|
|
|
|
# For qt 5.14 https://doc.qt.io/archives/qt-5.14/supported-platforms.html
|
2020-11-15 10:57:22 +01:00
|
|
|
# For Qt 5.13 https://doc.qt.io/archives/qt-5.13/supported-platforms.html
|
2022-11-19 17:40:18 +01:00
|
|
|
# For Qt 5.12 https://doc.qt.io/archives/qt-5.12/supported-platforms.html
|
|
|
|
# For older versions https://doc.qt.io/archives/qt-5.11/supported-platforms-and-configurations.html
|
2020-01-07 15:19:30 +01:00
|
|
|
equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 13) {# Qt 5.14
|
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13
|
2018-05-22 18:22:11 +02:00
|
|
|
} else {
|
2020-01-07 15:19:30 +01:00
|
|
|
equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 11) {# Qt 5.12
|
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
|
2018-05-22 18:22:11 +02:00
|
|
|
} else {
|
2020-01-07 15:19:30 +01:00
|
|
|
equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 10) {# Qt 5.11
|
2018-12-11 08:38:43 +01:00
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
|
2018-05-22 18:22:11 +02:00
|
|
|
} else {
|
2020-01-07 15:19:30 +01:00
|
|
|
equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 9) {# Qt 5.10
|
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
|
2018-05-22 18:22:11 +02:00
|
|
|
} else {
|
2020-01-07 15:19:30 +01:00
|
|
|
equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 8) {# Qt 5.9
|
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.10
|
2018-05-22 18:22:11 +02:00
|
|
|
} else {
|
2020-01-07 15:19:30 +01:00
|
|
|
equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 7) {# Qt 5.8
|
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
|
2018-05-22 18:22:11 +02:00
|
|
|
} else {
|
2020-01-07 15:19:30 +01:00
|
|
|
equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 6) {# Qt 5.7
|
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
|
2018-12-11 08:38:43 +01:00
|
|
|
} else {
|
2020-01-07 15:19:30 +01:00
|
|
|
equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 3) {# Qt 5.4
|
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
|
|
|
|
} else {
|
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
|
|
|
|
}
|
2018-12-11 08:38:43 +01:00
|
|
|
}
|
2018-05-22 18:22:11 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-01-24 15:12:43 +01:00
|
|
|
# See question on StackOwerflow "QSslSocket error when SSL is NOT used" (http://stackoverflow.com/a/31277055/3045403)
|
|
|
|
# Copy of answer:
|
|
|
|
# We occasionally had customers getting very similar warning messages but the software was also crashing.
|
|
|
|
# We determined it was because, although we weren't using SSL either, the program found a copy of OpenSSL on the
|
|
|
|
# customer's computer and tried interfacing with it. The version it found was too old though (from Qt 5.2 onwards v1.0.0
|
|
|
|
# or later is required).
|
|
|
|
#
|
|
|
|
# Our solution was to distribute the OpenSSL DLLs along with our application (~1.65 MB). The alternative is to compile
|
|
|
|
# Qt from scratch without OpenSSL support.
|
|
|
|
win32 {
|
2019-09-21 10:19:10 +02:00
|
|
|
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 10) {
|
|
|
|
versionAtLeast(QT_VERSION, 5.12.4){
|
|
|
|
# Minimal supported OpenSSL version since Qt 5.12.4 is 1.1.1.
|
|
|
|
contains(QMAKE_HOST.arch, x86_64) {
|
|
|
|
INSTALL_OPENSSL += \
|
|
|
|
../../../dist/win/openssl/win64/libcrypto-1_1-x64.dll \
|
|
|
|
../../../dist/win/openssl/win64/libssl-1_1-x64.dll
|
|
|
|
} else {
|
|
|
|
INSTALL_OPENSSL += \
|
|
|
|
../../../dist/win/openssl/win32/libcrypto-1_1.dll \
|
|
|
|
../../../dist/win/openssl/win32/libssl-1_1.dll
|
|
|
|
}
|
2019-09-20 15:49:16 +02:00
|
|
|
} else {
|
|
|
|
INSTALL_OPENSSL += \
|
2019-09-21 10:19:10 +02:00
|
|
|
../../../dist/win/msvcr120.dll
|
|
|
|
|
|
|
|
contains(QMAKE_HOST.arch, x86_64) {
|
|
|
|
INSTALL_OPENSSL += \
|
|
|
|
../../../dist/win/openssl/win64/libeay32.dll \
|
|
|
|
../../../dist/win/openssl/win64/ssleay32.dll
|
|
|
|
} else {
|
|
|
|
INSTALL_OPENSSL += \
|
|
|
|
../../../dist/win/openssl/win32/libeay32.dll \
|
|
|
|
../../../dist/win/openssl/win32/ssleay32.dll
|
|
|
|
}
|
2019-09-20 15:49:16 +02:00
|
|
|
}
|
2019-06-18 15:49:32 +02:00
|
|
|
} else {
|
|
|
|
INSTALL_OPENSSL += \
|
2019-09-20 15:49:16 +02:00
|
|
|
../../../dist/win/msvcr120.dll
|
|
|
|
|
|
|
|
contains(QMAKE_HOST.arch, x86_64) {
|
|
|
|
INSTALL_OPENSSL += \
|
|
|
|
../../../dist/win/openssl/win64/libeay32.dll \
|
|
|
|
../../../dist/win/openssl/win64/ssleay32.dll
|
|
|
|
} else {
|
|
|
|
INSTALL_OPENSSL += \
|
|
|
|
../../../dist/win/openssl/win32/libeay32.dll \
|
|
|
|
../../../dist/win/openssl/win32/ssleay32.dll
|
|
|
|
}
|
2019-06-18 15:49:32 +02:00
|
|
|
}
|
2017-01-24 15:12:43 +01:00
|
|
|
}
|
|
|
|
|
2018-04-03 10:15:58 +02:00
|
|
|
DEFINES += QT_NO_FOREACH
|
|
|
|
|
2015-10-14 16:50:33 +02:00
|
|
|
CONFIG(release, debug|release){
|
2017-07-05 10:35:32 +02:00
|
|
|
!noDebugSymbols:win32:!*msvc*{
|
2015-10-14 16:50:33 +02:00
|
|
|
unset(QMAKE_STRIP)
|
|
|
|
QMAKE_STRIP = echo # we do striping manualy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-05-07 10:47:53 +02:00
|
|
|
defineTest(minQtVersion) {
|
|
|
|
maj = $$1
|
|
|
|
min = $$2
|
|
|
|
patch = $$3
|
|
|
|
isEqual(QT_MAJOR_VERSION, $$maj) {
|
|
|
|
isEqual(QT_MINOR_VERSION, $$min) {
|
|
|
|
isEqual(QT_PATCH_VERSION, $$patch) {
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
greaterThan(QT_PATCH_VERSION, $$patch) {
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
greaterThan(QT_MINOR_VERSION, $$min) {
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
greaterThan(QT_MAJOR_VERSION, $$maj) {
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
return(false)
|
|
|
|
}
|
2014-05-15 11:29:12 +02:00
|
|
|
|
|
|
|
# Copies the given files to the destination directory
|
|
|
|
defineTest(copyToDestdir) {
|
|
|
|
files = $$1
|
|
|
|
DDIR = $$2
|
|
|
|
mkpath($$DDIR)
|
|
|
|
|
|
|
|
for(FILE, files) {
|
2015-12-18 15:46:31 +01:00
|
|
|
unix{
|
2017-10-30 09:02:01 +01:00
|
|
|
!exists($$DDIR/$$basename(FILE)) {
|
|
|
|
QMAKE_POST_LINK += ln -s -f $$quote($$FILE) $$quote($$DDIR/$$basename(FILE)) & $$escape_expand(\\n\\t)
|
|
|
|
}
|
2015-10-11 19:27:47 +02:00
|
|
|
} else {
|
2015-12-18 15:46:31 +01:00
|
|
|
!exists($$DDIR/$$basename(FILE)) {
|
|
|
|
# Replace slashes in paths with backslashes for Windows
|
|
|
|
win32{
|
|
|
|
FILE ~= s,/,\\,g
|
|
|
|
DDIR ~= s,/,\\,g
|
|
|
|
}
|
2017-06-25 23:27:52 +02:00
|
|
|
QMAKE_POST_LINK += $$VCOPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
|
2015-12-18 15:46:31 +01:00
|
|
|
}
|
2015-10-11 19:27:47 +02:00
|
|
|
|
2015-12-18 15:46:31 +01:00
|
|
|
QMAKE_CLEAN += $$DDIR/$$basename(FILE)
|
|
|
|
}
|
2014-05-15 11:29:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export(QMAKE_POST_LINK)
|
2015-10-11 19:27:47 +02:00
|
|
|
export(QMAKE_CLEAN)
|
2014-05-15 11:29:12 +02:00
|
|
|
}
|
2014-09-11 18:52:02 +02:00
|
|
|
|
2015-10-21 11:35:52 +02:00
|
|
|
# Alwayse copies the given files to the destination directory
|
|
|
|
defineTest(forceCopyToDestdir) {
|
|
|
|
files = $$1
|
|
|
|
DDIR = $$2
|
|
|
|
mkpath($$DDIR)
|
|
|
|
|
|
|
|
for(FILE, files) {
|
2015-12-18 15:46:31 +01:00
|
|
|
unix{
|
2017-07-01 22:17:06 +02:00
|
|
|
QMAKE_POST_LINK += ln -s -f $$quote($$FILE) $$quote($$DDIR/$$basename(FILE)) & $$escape_expand(\\n\\t)
|
2015-12-18 15:46:31 +01:00
|
|
|
} else {
|
|
|
|
# Replace slashes in paths with backslashes for Windows
|
|
|
|
win32{
|
|
|
|
FILE ~= s,/,\\,g
|
|
|
|
DDIR ~= s,/,\\,g
|
|
|
|
}
|
2017-06-25 23:27:52 +02:00
|
|
|
QMAKE_POST_LINK += $$VCOPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
|
2015-12-18 15:46:31 +01:00
|
|
|
QMAKE_CLEAN += $$DDIR/$$basename(FILE)
|
2015-10-21 11:35:52 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export(QMAKE_POST_LINK)
|
|
|
|
export(QMAKE_CLEAN)
|
|
|
|
}
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
# We use precompiled headers for more fast compilation source code.
|
|
|
|
defineReplace(set_PCH){
|
2015-11-16 11:22:34 +01:00
|
|
|
no_ccache{
|
2022-09-13 12:23:22 +02:00
|
|
|
no_pch{ # To disable recompiled headers (PCH) run qmake with CONFIG+=no_pch
|
|
|
|
return(true)
|
|
|
|
} else {
|
|
|
|
CONFIG += precompile_header # Turn on creation precompiled headers (PCH).
|
|
|
|
export(CONFIG) # export value to global variable.
|
2014-09-11 18:52:02 +02:00
|
|
|
|
2022-09-13 12:23:22 +02:00
|
|
|
PRECOMPILED_HEADER = stable.h # Header file with all all static headers: libraries, static local headers.
|
|
|
|
export(PRECOMPILED_HEADER) # export value to global variable
|
2014-09-11 18:52:02 +02:00
|
|
|
|
2022-09-13 12:23:22 +02:00
|
|
|
*msvc* {
|
|
|
|
PRECOMPILED_SOURCE = stable.cpp # MSVC need also cpp file.
|
|
|
|
export(PRECOMPILED_SOURCE) # export value to global variable.
|
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(enable_ccache){
|
2018-03-14 14:39:15 +01:00
|
|
|
*clang*:clazy {
|
|
|
|
QMAKE_CXX = clazy
|
|
|
|
export(QMAKE_CXX) # export value to global variable.
|
2015-05-16 16:14:35 +02:00
|
|
|
} else {
|
2018-03-14 14:39:15 +01:00
|
|
|
no_ccache{ # For enable run qmake with CONFIG+=no_ccache
|
|
|
|
$$set_PCH()
|
|
|
|
} else {
|
|
|
|
# ccache support only Unix systems.
|
|
|
|
unix:{
|
2019-08-12 10:17:09 +02:00
|
|
|
equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 8):greaterThan(QT_PATCH_VERSION, 1) {
|
|
|
|
# since Qt 5.9.2 we have built-in support for ccache
|
|
|
|
CONFIG += ccache
|
|
|
|
export(CONFIG) # export value to global variable.
|
|
|
|
} else {
|
|
|
|
ccache_prefix = ccache
|
2018-03-14 14:39:15 +01:00
|
|
|
|
2019-08-12 10:17:09 +02:00
|
|
|
for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_LINK_C)): \
|
|
|
|
$$tool = $$ccache_prefix $$eval($$tool)
|
2014-10-27 15:29:31 +01:00
|
|
|
|
2019-08-12 10:17:09 +02:00
|
|
|
export(QMAKE_CC)
|
|
|
|
export(QMAKE_CXX)
|
|
|
|
export(QMAKE_LINK)
|
|
|
|
export(QMAKE_LINK_SHLIB)
|
|
|
|
export(QMAKE_LINK_C)
|
2018-03-14 14:39:15 +01:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$$set_PCH()
|
2015-05-16 16:14:35 +02:00
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
2017-04-10 19:24:58 +02:00
|
|
|
defineReplace(FindBuildRevision){
|
2020-01-31 08:00:40 +01:00
|
|
|
CONFIG(debug, debug|release){
|
|
|
|
# Debug mode
|
|
|
|
return(\\\"unknown\\\")
|
|
|
|
}else{
|
|
|
|
# Release mode
|
2017-04-10 19:24:58 +02:00
|
|
|
DVCS_HESH=$$system("git rev-parse --short HEAD")
|
|
|
|
isEmpty(DVCS_HESH){
|
2017-04-17 10:46:10 +02:00
|
|
|
DVCS_HESH = \\\"unknown\\\" # if we can't find build revision left unknown.
|
2017-04-10 19:24:58 +02:00
|
|
|
} else {
|
|
|
|
DVCS_HESH=\\\"Git:$${DVCS_HESH}\\\"
|
|
|
|
}
|
2020-01-31 08:00:40 +01:00
|
|
|
return($${DVCS_HESH})
|
2017-04-10 19:24:58 +02:00
|
|
|
}
|
|
|
|
}
|
2020-01-31 08:00:40 +01:00
|
|
|
|
|
|
|
defineReplace(FindLatestTagDistance){
|
|
|
|
CONFIG(debug, debug|release){
|
|
|
|
# Debug mode
|
2021-05-13 20:38:24 +02:00
|
|
|
return(0)
|
2020-01-31 08:00:40 +01:00
|
|
|
}else{
|
|
|
|
# Release mode
|
|
|
|
|
|
|
|
# tag is formatted as TAG-N-gSHA:
|
|
|
|
# 1. latest stable version is TAG, or vX.Y.Z
|
|
|
|
# 2. number of commits since latest stable version is N
|
|
|
|
# 3. latest commit is gSHA
|
|
|
|
tag_all = $$system(git describe --tags)
|
|
|
|
tag_split = $$split(tag_all, "-") #split at the dashes
|
2021-05-13 20:38:24 +02:00
|
|
|
GIT_DISTANCE = $$member(tag_split,1) #get 2nd element of results
|
2020-01-31 08:00:40 +01:00
|
|
|
|
|
|
|
isEmpty(GIT_DISTANCE){
|
2021-05-13 20:38:24 +02:00
|
|
|
GIT_DISTANCE = 0 # if we can't find local revision left 0.
|
2020-01-31 08:00:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message("Latest tag distance:" $${GIT_DISTANCE})
|
|
|
|
|
|
|
|
return($${GIT_DISTANCE})
|
|
|
|
}
|
2017-04-10 19:24:58 +02:00
|
|
|
}
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
# In debug mode on Unix system we use all usefull for us compilers keys for checking errors.
|
|
|
|
# Also trying make all possible for speed up build time.
|
|
|
|
unix {
|
2020-12-24 12:27:49 +01:00
|
|
|
LIBS_USED_FOR_QT = \
|
|
|
|
QtCore \
|
|
|
|
QtSvg \
|
|
|
|
QtXml \
|
|
|
|
QtPrintSupport \
|
|
|
|
QtXmlPatterns \
|
|
|
|
QtWidgets \
|
|
|
|
QtGui \
|
|
|
|
QtNetwork \
|
|
|
|
QtTest \
|
|
|
|
QtConcurrent
|
|
|
|
|
2020-12-26 18:44:55 +01:00
|
|
|
# Key -isystem disable checking errors in system headers. Marking ignore for warnings in Qt headers.
|
|
|
|
!macx{
|
|
|
|
ISYSTEM += -isystem "$$[QT_INSTALL_HEADERS]"
|
2020-12-26 17:52:02 +01:00
|
|
|
|
2020-12-26 18:44:55 +01:00
|
|
|
for(somelib, $$list($$LIBS_USED_FOR_QT)) {
|
|
|
|
ISYSTEM += -isystem "$$[QT_INSTALL_HEADERS]/$${somelib}"
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
for(somelib, $$list($$LIBS_USED_FOR_QT)) {
|
|
|
|
ISYSTEM += -isystem "$$[QT_INSTALL_LIBS]/$${somelib}.framework/Versions/5/Headers"
|
|
|
|
ISYSTEM += -isystem "$$[QT_INSTALL_LIBS]/$${somelib}.framework/Headers"
|
2020-12-24 12:27:49 +01:00
|
|
|
}
|
2015-03-16 10:44:14 +01:00
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
|
|
# Usefull GCC warnings keys.
|
|
|
|
GCC_DEBUG_CXXFLAGS += \
|
|
|
|
-O0 \ # Turn off oprimization.
|
|
|
|
$$ISYSTEM \ # Ignore warnings Qt headers.
|
|
|
|
# Last gdb doesn't show debug symbols with Qt Creator (issue with Python 3 and debug scripts that use Python 2.7).
|
|
|
|
# Solution to use older version gdb, that's why we use old standard of debug information.
|
|
|
|
-gdwarf-3 \
|
|
|
|
-Wall \
|
|
|
|
-Wextra \
|
|
|
|
-pedantic \
|
|
|
|
-Weffc++ \
|
|
|
|
-Woverloaded-virtual \
|
|
|
|
-Wctor-dtor-privacy \
|
|
|
|
-Wnon-virtual-dtor \
|
|
|
|
-Wold-style-cast \
|
|
|
|
-Wconversion \
|
|
|
|
-Winit-self \
|
2017-07-06 14:45:58 +02:00
|
|
|
# -Wstack-protector \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wunreachable-code \
|
|
|
|
-Wcast-align \
|
|
|
|
-Wcast-qual \
|
|
|
|
-Wdisabled-optimization \
|
|
|
|
-Wfloat-equal \
|
|
|
|
-Wformat=2 \
|
|
|
|
-Wimport \
|
|
|
|
-Wmissing-include-dirs \
|
|
|
|
-Wpacked \
|
|
|
|
-Wredundant-decls \
|
2016-07-20 17:58:21 +02:00
|
|
|
# -Winline \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Winvalid-pch \
|
2016-07-25 17:22:42 +02:00
|
|
|
# -Wunsafe-loop-optimizations \
|
2017-06-20 10:30:44 +02:00
|
|
|
# -Wlong-long \ We have been using C++11
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wmissing-format-attribute \
|
|
|
|
-Wswitch-default \
|
|
|
|
-Wuninitialized \
|
2015-04-01 19:08:35 +02:00
|
|
|
-Wvariadic-macros \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wlogical-op \
|
|
|
|
-Wnoexcept \
|
|
|
|
-Wmissing-noreturn \
|
|
|
|
-Wpointer-arith \
|
|
|
|
-Wstrict-null-sentinel \
|
2017-09-29 20:27:38 +02:00
|
|
|
-Wstrict-overflow=5 \
|
|
|
|
-Wno-error=strict-overflow \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wundef \
|
|
|
|
-Wno-unused \
|
2019-04-03 15:12:18 +02:00
|
|
|
-Wno-pragmas \
|
2015-05-11 09:10:25 +02:00
|
|
|
-ftrapv
|
2014-10-27 15:29:31 +01:00
|
|
|
|
2016-08-07 13:14:17 +02:00
|
|
|
# Since GCC 5
|
|
|
|
g++5:GCC_DEBUG_CXXFLAGS += \
|
|
|
|
-Wswitch-bool \
|
|
|
|
-Wlogical-not-parentheses \
|
|
|
|
-Wsizeof-array-argument \
|
2021-09-25 19:22:33 +02:00
|
|
|
# -Wsuggest-final-types \
|
|
|
|
# -Wsuggest-final-methods \
|
2021-09-25 16:45:02 +02:00
|
|
|
-Wbool-compare
|
2016-08-07 13:14:17 +02:00
|
|
|
|
|
|
|
# Since GCC 6
|
|
|
|
g++6:GCC_DEBUG_CXXFLAGS += \
|
|
|
|
-Wshift-negative-value \
|
|
|
|
-Wshift-overflow \
|
|
|
|
-Wshift-overflow=2 \
|
|
|
|
-Wtautological-compare \
|
2021-09-25 19:21:36 +02:00
|
|
|
# -Wnull-dereference \
|
2016-08-07 13:14:17 +02:00
|
|
|
-Wduplicated-cond \
|
|
|
|
-Wmisleading-indentation
|
|
|
|
|
2017-03-23 09:36:11 +01:00
|
|
|
# Since GCC 7
|
2021-09-25 19:12:15 +02:00
|
|
|
g++7:GCC_DEBUG_CXXFLAGS += \
|
|
|
|
-Wduplicated-branches \
|
|
|
|
-Wrestrict \
|
|
|
|
-Walloc-zero \
|
|
|
|
-Wnonnull \
|
|
|
|
-Wno-stringop-overflow # cannot suppress warning in Qt headers
|
2017-03-23 09:36:11 +01:00
|
|
|
|
2019-05-05 16:45:51 +02:00
|
|
|
# Since GCC 8
|
|
|
|
g++8:GCC_DEBUG_CXXFLAGS += \
|
2021-09-25 06:43:41 +02:00
|
|
|
-Wmultistatement-macros \
|
2021-09-25 19:22:33 +02:00
|
|
|
-Warray-bounds
|
2019-04-03 14:42:12 +02:00
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
# Usefull Clang warnings keys.
|
|
|
|
CLANG_DEBUG_CXXFLAGS += \
|
|
|
|
-O0 \ # Turn off oprimization.
|
2014-12-20 19:18:00 +01:00
|
|
|
$$ISYSTEM \ # Ignore warnings in Qt headers.
|
2014-10-27 15:29:31 +01:00
|
|
|
# Last gdb doesn't show debug symbols with Qt Creator (issue with Python 3 and debug scripts that use Python 2.7).
|
|
|
|
# Solution to use older version gdb, that's why we use old standard of debug information.
|
|
|
|
-gdwarf-3 \
|
|
|
|
-fparse-all-comments \
|
|
|
|
-Wabi \
|
|
|
|
-Wabstract-final-class \
|
|
|
|
-Wabstract-vbase-init \
|
|
|
|
-Waddress \
|
|
|
|
-Waddress-of-temporary \
|
|
|
|
-Waggregate-return \
|
|
|
|
-Wall \
|
|
|
|
-Wambiguous-macro \
|
|
|
|
-Wambiguous-member-template \
|
|
|
|
-Wanalyzer-incompatible-plugin \
|
|
|
|
-Wanonymous-pack-parens \
|
|
|
|
-Warc \
|
|
|
|
-Warc-bridge-casts-disallowed-in-nonarc \
|
|
|
|
-Warc-maybe-repeated-use-of-weak \
|
|
|
|
-Warc-non-pod-memaccess \
|
|
|
|
-Warc-performSelector-leaks \
|
|
|
|
-Warc-repeated-use-of-weak \
|
|
|
|
-Warc-retain-cycles \
|
|
|
|
-Warc-unsafe-retained-assign \
|
|
|
|
-Warray-bounds \
|
|
|
|
-Warray-bounds-pointer-arithmetic \
|
|
|
|
-Wasm \
|
|
|
|
-Wasm-operand-widths \
|
|
|
|
-Wassign-enum \
|
|
|
|
-Watomic-properties \
|
|
|
|
-Watomic-property-with-user-defined-accessor \
|
|
|
|
-Wattributes \
|
|
|
|
-Wauto-import \
|
|
|
|
-Wauto-storage-class \
|
|
|
|
-Wauto-var-id \
|
|
|
|
-Wavailability \
|
|
|
|
-Wbackslash-newline-escape \
|
2018-03-10 15:35:14 +01:00
|
|
|
# -Wbad-array-new-length \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wbad-function-cast \
|
|
|
|
-Wbind-to-temporary-copy \
|
2016-05-03 18:50:37 +02:00
|
|
|
-Wno-c++98-compat-bind-to-temporary-copy \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wbitfield-constant-conversion \
|
|
|
|
-Wbitwise-op-parentheses \
|
|
|
|
-Wbool-conversion \
|
|
|
|
-Wbool-conversions \
|
|
|
|
-Wbuiltin-macro-redefined \
|
|
|
|
-Wbuiltin-requires-header \
|
|
|
|
-Wc++-compat \
|
|
|
|
-Wc++0x-compat \
|
|
|
|
-Wc++0x-extensions \
|
|
|
|
-Wc++0x-narrowing \
|
|
|
|
-Wc++11-compat \
|
|
|
|
-Wc++11-compat-pedantic \
|
|
|
|
-Wc++11-compat-reserved-user-defined-literal \
|
|
|
|
-Wc++11-extensions \
|
|
|
|
-Wc++11-extra-semi \
|
|
|
|
-Wc++11-long-long \
|
|
|
|
-Wc++11-narrowing \
|
|
|
|
-Wc11-extensions \
|
|
|
|
-Wcast-align \
|
|
|
|
-Wcast-of-sel-type \
|
|
|
|
-Wcast-qual \
|
|
|
|
-WCFString-literal \
|
|
|
|
-Wchar-align \
|
|
|
|
-Wchar-subscripts \
|
|
|
|
-Wcomment \
|
|
|
|
-Wcomments \
|
|
|
|
-Wcompare-distinct-pointer-types \
|
|
|
|
-Wcomplex-component-init \
|
|
|
|
-Wconditional-type-mismatch \
|
|
|
|
-Wconditional-uninitialized \
|
|
|
|
-Wconfig-macros \
|
|
|
|
-Wconstant-conversion \
|
|
|
|
-Wconstant-logical-operand \
|
|
|
|
-Wconstexpr-not-const \
|
|
|
|
-Wconversion \
|
|
|
|
-Wconversion-null \
|
|
|
|
-Wno-covered-switch-default \
|
|
|
|
-Wctor-dtor-privacy \
|
|
|
|
-Wcustom-atomic-properties \
|
|
|
|
-Wdangling-else \
|
|
|
|
-Wdangling-field \
|
|
|
|
-Wdangling-initializer-list \
|
|
|
|
-Wdeclaration-after-statement \
|
|
|
|
-Wdelegating-ctor-cycles \
|
|
|
|
-Wdelete-incomplete \
|
2022-11-10 14:40:41 +01:00
|
|
|
-Wdelete-non-virtual-dtor \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wdeprecated \
|
|
|
|
-Wdeprecated-declarations \
|
|
|
|
-Wdeprecated-implementations \
|
|
|
|
-Wdeprecated-objc-isa-usage \
|
|
|
|
-Wdeprecated-objc-pointer-introspection \
|
|
|
|
-Wdeprecated-objc-pointer-introspection-performSelector \
|
|
|
|
-Wdeprecated-register \
|
|
|
|
-Wdeprecated-writable-strings \
|
|
|
|
-Wdirect-ivar-access \
|
2015-10-19 15:21:06 +02:00
|
|
|
# -Wdisabled-macro-expansion \ Disabled
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wdisabled-optimization \
|
|
|
|
-Wdiscard-qual \
|
|
|
|
-Wdistributed-object-modifiers \
|
|
|
|
-Wdiv-by-zero \
|
|
|
|
-Wdivision-by-zero \
|
|
|
|
-Wdocumentation \
|
|
|
|
-Wdocumentation-deprecated-sync \
|
|
|
|
-Wdocumentation-html \
|
|
|
|
-Wdollar-in-identifier-extension \
|
|
|
|
-Wduplicate-decl-specifier \
|
|
|
|
-Wduplicate-enum \
|
|
|
|
-Wduplicate-method-arg \
|
|
|
|
-Wduplicate-method-match \
|
|
|
|
-Wdynamic-class-memaccess \
|
|
|
|
-Weffc++ \
|
|
|
|
-Wembedded-directive \
|
|
|
|
-Wempty-body \
|
|
|
|
-Wempty-translation-unit \
|
|
|
|
-Wendif-labels \
|
|
|
|
-Wenum-compare \
|
|
|
|
-Wenum-conversion \
|
|
|
|
-Wexplicit-ownership-type \
|
|
|
|
-Wextern-initializer \
|
|
|
|
-Wextra \
|
|
|
|
-Wextra-semi \
|
|
|
|
-Wextra-tokens \
|
|
|
|
-Wflexible-array-extensions \
|
|
|
|
-Wfloat-equal \
|
|
|
|
-Wformat \
|
|
|
|
-Wformat-extra-args \
|
|
|
|
-Wformat-invalid-specifier \
|
|
|
|
-Wformat-non-iso \
|
|
|
|
-Wformat-nonliteral \
|
|
|
|
-Wformat-security \
|
|
|
|
-Wformat-y2k \
|
|
|
|
-Wformat-zero-length \
|
|
|
|
-Wformat=2 \
|
|
|
|
-Wfour-char-constants \
|
|
|
|
-Wgcc-compat \
|
|
|
|
-Wgnu \
|
|
|
|
-Wgnu-array-member-paren-init \
|
|
|
|
-Wgnu-designator \
|
|
|
|
-Wgnu-static-float-init \
|
|
|
|
-Wheader-guard \
|
|
|
|
-Wheader-hygiene \
|
|
|
|
-Widiomatic-parentheses \
|
|
|
|
-Wignored-attributes \
|
|
|
|
-Wignored-qualifiers \
|
|
|
|
-Wimplicit \
|
|
|
|
-Wimplicit-atomic-properties \
|
|
|
|
-Wimplicit-conversion-floating-point-to-bool \
|
|
|
|
-Wimplicit-exception-spec-mismatch \
|
|
|
|
-Wimplicit-fallthrough \
|
|
|
|
-Wimplicit-fallthrough-per-function \
|
|
|
|
-Wimplicit-function-declaration \
|
|
|
|
-Wimplicit-int \
|
|
|
|
-Wimplicit-retain-self \
|
|
|
|
-Wimport \
|
|
|
|
-Wimport-preprocessor-directive-pedantic \
|
|
|
|
-Wincompatible-library-redeclaration \
|
|
|
|
-Wincompatible-pointer-types \
|
|
|
|
-Wincompatible-pointer-types-discards-qualifiers \
|
|
|
|
-Wincomplete-implementation \
|
|
|
|
-Wincomplete-module \
|
|
|
|
-Wincomplete-umbrella \
|
|
|
|
-Winit-self \
|
|
|
|
-Winitializer-overrides \
|
2016-07-20 17:58:21 +02:00
|
|
|
# -Winline \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wint-conversion \
|
|
|
|
-Wint-conversions \
|
|
|
|
-Wint-to-pointer-cast \
|
|
|
|
-Wint-to-void-pointer-cast \
|
|
|
|
-Winteger-overflow \
|
|
|
|
-Winvalid-constexpr \
|
|
|
|
-Winvalid-iboutlet \
|
|
|
|
-Winvalid-noreturn \
|
|
|
|
-Winvalid-offsetof \
|
|
|
|
-Winvalid-pch \
|
|
|
|
-Winvalid-pp-token \
|
|
|
|
-Winvalid-source-encoding \
|
|
|
|
-Winvalid-token-paste \
|
|
|
|
-Wknr-promoted-parameter \
|
|
|
|
-Wlanguage-extension-token \
|
|
|
|
-Wlarge-by-value-copy \
|
|
|
|
-Wliteral-conversion \
|
|
|
|
-Wliteral-range \
|
|
|
|
-Wlocal-type-template-args \
|
2016-05-03 18:50:37 +02:00
|
|
|
-Wno-c++98-compat-local-type-template-args \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wlogical-not-parentheses \
|
|
|
|
-Wlogical-op-parentheses \
|
2017-06-20 10:30:44 +02:00
|
|
|
# -Wlong-long \ We have been using C++11
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wloop-analysis \
|
|
|
|
-Wmain \
|
|
|
|
-Wmain-return-type \
|
|
|
|
-Wmalformed-warning-check \
|
|
|
|
-Wmethod-signatures \
|
|
|
|
-Wmicrosoft \
|
|
|
|
-Wmicrosoft-exists \
|
|
|
|
-Wmismatched-parameter-types \
|
|
|
|
-Wmismatched-return-types \
|
|
|
|
-Wmismatched-tags \
|
|
|
|
-Wmissing-braces \
|
|
|
|
-Wmissing-declarations \
|
|
|
|
-Wmissing-field-initializers \
|
|
|
|
-Wmissing-format-attribute \
|
|
|
|
-Wmissing-include-dirs \
|
|
|
|
-Wmissing-method-return-type \
|
|
|
|
-Wmissing-noreturn \
|
|
|
|
-Wmissing-prototypes \
|
|
|
|
-Wmissing-selector-name \
|
|
|
|
-Wmissing-sysroot \
|
|
|
|
-Wmissing-variable-declarations \
|
|
|
|
-Wmodule-conflict \
|
|
|
|
-Wmost \
|
|
|
|
-Wmultichar \
|
|
|
|
-Wnarrowing \
|
|
|
|
-Wnested-externs \
|
|
|
|
-Wnewline-eof \
|
|
|
|
-Wnon-gcc \
|
|
|
|
-Wnon-literal-null-conversion \
|
|
|
|
-Wnon-pod-varargs \
|
|
|
|
-Wnon-virtual-dtor \
|
|
|
|
-Wnonnull \
|
|
|
|
-Wnonportable-cfstrings \
|
2015-10-19 15:21:06 +02:00
|
|
|
-Wno-c++98-compat \
|
2014-10-27 15:29:31 +01:00
|
|
|
-WNSObject-attribute \
|
|
|
|
-Wnull-arithmetic \
|
|
|
|
-Wnull-character \
|
|
|
|
-Wnull-conversion \
|
|
|
|
-Wnull-dereference \
|
|
|
|
-Wodr \
|
|
|
|
-Wold-style-cast \
|
|
|
|
-Wold-style-definition \
|
|
|
|
-Wout-of-line-declaration \
|
|
|
|
-Wover-aligned \
|
|
|
|
-Woverflow \
|
|
|
|
-Woverlength-strings \
|
|
|
|
-Woverloaded-shift-op-parentheses \
|
|
|
|
-Woverloaded-virtual \
|
|
|
|
-Woverriding-method-mismatch \
|
|
|
|
-Wpacked \
|
|
|
|
-Wparentheses \
|
|
|
|
-Wparentheses-equality \
|
|
|
|
-Wpedantic \
|
|
|
|
-Wpointer-arith \
|
|
|
|
-Wpointer-sign \
|
|
|
|
-Wpointer-to-int-cast \
|
|
|
|
-Wpointer-type-mismatch \
|
|
|
|
-Wpredefined-identifier-outside-function \
|
|
|
|
-Wprivate-extern \
|
|
|
|
-Wprotocol \
|
|
|
|
-Wprotocol-property-synthesis-ambiguity \
|
|
|
|
-Wreadonly-iboutlet-property \
|
|
|
|
-Wreceiver-expr \
|
|
|
|
-Wreceiver-forward-class \
|
|
|
|
-Wredundant-decls \
|
|
|
|
-Wreinterpret-base-class \
|
|
|
|
-Wreorder \
|
|
|
|
-Wrequires-super-attribute \
|
|
|
|
-Wreserved-user-defined-literal \
|
|
|
|
-Wreturn-stack-address \
|
|
|
|
-Wreturn-type \
|
|
|
|
-Wreturn-type-c-linkage \
|
|
|
|
-Wsection \
|
|
|
|
-Wselector \
|
|
|
|
-Wselector-type-mismatch \
|
|
|
|
-Wself-assign \
|
|
|
|
-Wself-assign-field \
|
|
|
|
-Wsemicolon-before-method-body \
|
|
|
|
-Wsentinel \
|
|
|
|
-Wsequence-point \
|
|
|
|
-Wserialized-diagnostics \
|
|
|
|
-Wshadow-ivar \
|
|
|
|
-Wshift-count-negative \
|
|
|
|
-Wshift-count-overflow \
|
|
|
|
-Wshift-op-parentheses \
|
|
|
|
-Wshift-overflow \
|
|
|
|
-Wshift-sign-overflow \
|
|
|
|
-Wshorten-64-to-32 \
|
|
|
|
-Wsign-compare \
|
|
|
|
-Wsign-conversion \
|
|
|
|
-Wsign-promo \
|
|
|
|
-Wsizeof-array-argument \
|
|
|
|
-Wsizeof-array-decay \
|
|
|
|
-Wsizeof-pointer-memaccess \
|
|
|
|
-Wsometimes-uninitialized \
|
|
|
|
-Wsource-uses-openmp \
|
2017-07-06 14:45:58 +02:00
|
|
|
# -Wstack-protector \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wstatic-float-init \
|
|
|
|
-Wstatic-in-inline \
|
|
|
|
-Wstatic-local-in-inline \
|
|
|
|
-Wstatic-self-init \
|
|
|
|
-Wstrict-aliasing \
|
|
|
|
-Wstrict-aliasing=0 \
|
|
|
|
-Wstrict-aliasing=1 \
|
|
|
|
-Wstrict-aliasing=2 \
|
|
|
|
-Wstrict-overflow \
|
|
|
|
-Wstrict-overflow=0 \
|
|
|
|
-Wstrict-overflow=1 \
|
|
|
|
-Wstrict-overflow=2 \
|
|
|
|
-Wstrict-overflow=3 \
|
|
|
|
-Wstrict-overflow=4 \
|
|
|
|
-Wstrict-overflow=5 \
|
|
|
|
-Wstrict-prototypes \
|
|
|
|
-Wstrict-selector-match \
|
|
|
|
-Wstring-compare \
|
|
|
|
-Wstring-conversion \
|
|
|
|
-Wstring-plus-int \
|
|
|
|
-Wstrlcpy-strlcat-size \
|
|
|
|
-Wstrncat-size \
|
|
|
|
-Wsuper-class-method-mismatch \
|
|
|
|
-Wswitch \
|
|
|
|
-Wswitch-default \
|
|
|
|
-Wsynth \
|
|
|
|
-Wtautological-compare \
|
|
|
|
-Wtautological-constant-out-of-range-compare \
|
|
|
|
-Wtentative-definition-incomplete-type \
|
|
|
|
-Wthread-safety \
|
|
|
|
-Wthread-safety-analysis \
|
|
|
|
-Wthread-safety-attributes \
|
|
|
|
-Wthread-safety-beta \
|
|
|
|
-Wthread-safety-precise \
|
|
|
|
-Wtrigraphs \
|
|
|
|
-Wtype-limits \
|
|
|
|
-Wtype-safety \
|
|
|
|
-Wtypedef-redefinition \
|
|
|
|
-Wtypename-missing \
|
|
|
|
-Wundeclared-selector \
|
|
|
|
-Wundef \
|
|
|
|
-Wundefined-inline \
|
|
|
|
-Wundefined-internal \
|
|
|
|
-Wundefined-reinterpret-cast \
|
|
|
|
-Wunicode \
|
|
|
|
-Wunicode-whitespace \
|
|
|
|
-Wuninitialized \
|
|
|
|
-Wunnamed-type-template-args \
|
|
|
|
-Wunneeded-internal-declaration \
|
|
|
|
-Wunneeded-member-function \
|
|
|
|
-Wunsequenced \
|
|
|
|
-Wunsupported-visibility \
|
|
|
|
-Wunused \
|
|
|
|
-Wunused-argument \
|
|
|
|
-Wunused-command-line-argument \
|
|
|
|
-Wunused-comparison \
|
|
|
|
-Wunused-exception-parameter \
|
|
|
|
-Wunused-function \
|
|
|
|
-Wunused-label \
|
|
|
|
-Wunused-member-function \
|
|
|
|
-Wunused-parameter \
|
|
|
|
-Wunused-private-field \
|
|
|
|
-Wunused-result \
|
|
|
|
-Wunused-value \
|
|
|
|
-Wunused-variable \
|
|
|
|
-Wunused-volatile-lvalue \
|
|
|
|
-Wuser-defined-literals \
|
|
|
|
-Wvarargs \
|
|
|
|
-Wvariadic-macros \
|
|
|
|
-Wvector-conversion \
|
|
|
|
-Wvector-conversions \
|
|
|
|
-Wvexing-parse \
|
|
|
|
-Wvisibility \
|
|
|
|
-Wvla \
|
|
|
|
-Wvla-extension \
|
|
|
|
-Wvolatile-register-var \
|
|
|
|
-Wweak-template-vtables \
|
2017-04-01 17:09:32 +02:00
|
|
|
# -Wweak-vtables \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wwrite-strings \
|
|
|
|
-Wzero-length-array \
|
|
|
|
-Qunused-arguments \
|
2015-11-16 11:28:21 +01:00
|
|
|
-fcolor-diagnostics \
|
2021-09-13 19:16:20 +02:00
|
|
|
-Wno-gnu-zero-variadic-macro-arguments \
|
2015-11-16 11:28:21 +01:00
|
|
|
-fms-extensions # Need for pragma message
|
2015-10-20 16:32:01 +02:00
|
|
|
|
2021-09-25 14:44:47 +02:00
|
|
|
macx{
|
|
|
|
# Cannot suppress warnings from Qt headers
|
|
|
|
CLANG_DEBUG_CXXFLAGS += \
|
|
|
|
-Wno-sign-conversion \
|
2021-09-25 16:18:15 +02:00
|
|
|
-Wno-duplicate-enum \
|
|
|
|
-Wno-shorten-64-to-32 \
|
2021-09-25 16:45:18 +02:00
|
|
|
-Wno-deprecated
|
2021-09-25 14:44:47 +02:00
|
|
|
}
|
|
|
|
|
2019-04-05 11:27:30 +02:00
|
|
|
CONFIG(release, debug|release){
|
|
|
|
CLANG_DEBUG_CXXFLAGS += -Wno-unknown-warning-option
|
2018-08-12 08:45:04 +02:00
|
|
|
}
|
|
|
|
|
2015-10-20 16:32:01 +02:00
|
|
|
ICC_DEBUG_CXXFLAGS += \
|
|
|
|
$$ISYSTEM \ # Ignore warnings Qt headers.
|
|
|
|
-Wcomment \
|
2015-10-21 09:25:27 +02:00
|
|
|
-Weffc++ \
|
2015-10-20 16:32:01 +02:00
|
|
|
-Wextra-tokens \
|
|
|
|
-Wformat \
|
2016-07-20 17:58:21 +02:00
|
|
|
# -Winline \
|
2015-10-20 16:32:01 +02:00
|
|
|
-Wmain \
|
|
|
|
-Wmissing-declarations \
|
|
|
|
-Wmissing-prototypes \
|
|
|
|
-Wnon-virtual-dtor \
|
|
|
|
-Wp64 \
|
|
|
|
-Wpointer-arith \
|
|
|
|
-Wremarks \
|
|
|
|
-Wreturn-type \
|
|
|
|
-Wsign-compare \
|
|
|
|
-Wstrict-aliasing \
|
|
|
|
-Wstrict-prototypes \
|
|
|
|
-Wtrigraphs \
|
|
|
|
-Wuninitialized \
|
2019-04-03 14:42:12 +02:00
|
|
|
-Wno-unknown-pragmas \
|
2015-10-20 16:32:01 +02:00
|
|
|
-Wunused-variable \
|
|
|
|
-Wno-pch-messages \
|
2015-10-21 09:25:27 +02:00
|
|
|
-wd1418,2012,2015,2017,2022,2013 #disable warnings. Syntax example -wd1572,873,2259,2261
|
2014-10-27 15:29:31 +01:00
|
|
|
} else {
|
|
|
|
# Don't use additional GCC and Clang keys on Windows system.
|
|
|
|
# Can't find way mark ignore Qt header on Windows.
|
|
|
|
GCC_DEBUG_CXXFLAGS += \
|
|
|
|
-O0 \
|
|
|
|
-Wall \
|
2019-04-03 15:12:18 +02:00
|
|
|
-Wno-pragmas \
|
2017-09-30 09:36:36 +02:00
|
|
|
-Wno-error=strict-overflow \
|
2014-10-27 15:29:31 +01:00
|
|
|
-Wextra \
|
2014-11-13 13:14:00 +01:00
|
|
|
-fno-omit-frame-pointer # Need for exchndl.dll
|
2014-10-27 15:29:31 +01:00
|
|
|
|
2019-07-08 09:34:04 +02:00
|
|
|
win32:equals(QT_MAJOR_VERSION, 5):equals(QT_MINOR_VERSION, 6) {
|
|
|
|
GCC_DEBUG_CXXFLAGS += \
|
|
|
|
-Wno-array-bounds # annoying warning
|
|
|
|
}
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
CLANG_DEBUG_CXXFLAGS += \
|
|
|
|
-O0 \
|
|
|
|
-Wall \
|
|
|
|
-Wextra \
|
|
|
|
-pedantic \
|
2021-09-13 19:16:20 +02:00
|
|
|
-Wno-gnu-zero-variadic-macro-arguments \
|
2015-11-16 11:28:21 +01:00
|
|
|
-fno-omit-frame-pointer \ # Need for exchndl.dll
|
|
|
|
-fms-extensions # Need for pragma message
|
2016-07-29 20:04:53 +02:00
|
|
|
|
|
|
|
MSVC_DEBUG_CXXFLAGS += \
|
|
|
|
-Wall \
|
|
|
|
-wd4061 \ # enum value is not *explicitly* handled in switch
|
|
|
|
-wd4099 \ # first seen using 'struct' now seen using 'class'
|
|
|
|
-wd4127 \ # conditional expression is constant
|
|
|
|
-wd4217 \ # member template isn't copy constructor
|
|
|
|
-wd4250 \ # inherits (implements) some member via dominance
|
|
|
|
-wd4251 \ # needs to have dll-interface to be used by clients
|
|
|
|
-wd4275 \ # exported class derived from non-exported class
|
|
|
|
-wd4347 \ # "behavior change", function called instead of template
|
|
|
|
-wd4355 \ # "'this': used in member initializer list
|
|
|
|
-wd4505 \ # unreferenced function has been removed
|
|
|
|
-wd4510 \ # default constructor could not be generated
|
|
|
|
-wd4511 \ # copy constructor could not be generated
|
|
|
|
-wd4512 \ # assignment operator could not be generated
|
|
|
|
-wd4513 \ # destructor could not be generated
|
2016-08-06 14:59:30 +02:00
|
|
|
-wd4514 \ # 'function' : unreferenced inline function has been removed
|
2016-07-29 20:04:53 +02:00
|
|
|
-wd4610 \ # can never be instantiated user defined constructor required
|
|
|
|
-wd4623 \ # default constructor could not be generated
|
|
|
|
-wd4624 \ # destructor could not be generated
|
|
|
|
-wd4625 \ # copy constructor could not be generated
|
|
|
|
-wd4626 \ # assignment operator could not be generated
|
|
|
|
-wd4640 \ # a local static object is not thread-safe
|
|
|
|
-wd4661 \ # a member of the template class is not defined.
|
|
|
|
-wd4670 \ # a base class of an exception class is inaccessible for catch
|
|
|
|
-wd4672 \ # a base class of an exception class is ambiguous for catch
|
|
|
|
-wd4673 \ # a base class of an exception class is inaccessible for catch
|
|
|
|
-wd4675 \ # resolved overload was found by argument-dependent lookup
|
|
|
|
-wd4702 \ # unreachable code, e.g. in <list> header.
|
|
|
|
-wd4710 \ # call was not inlined
|
|
|
|
-wd4711 \ # call was inlined
|
|
|
|
-wd4820 \ # some padding was added
|
|
|
|
-wd4917 \ # a GUID can only be associated with a class, interface or namespace
|
2016-08-06 14:59:30 +02:00
|
|
|
-wd4351 \ # elements of array 'array' will be default initialized
|
2016-07-29 20:04:53 +02:00
|
|
|
# The following are real warnings but are generated by almost all MS headers, including
|
|
|
|
# standard library headers, so it's impractical to leave them on.
|
|
|
|
-wd4619 \ # there is no warning number 'XXXX'
|
2016-08-06 14:59:30 +02:00
|
|
|
-wd4668 \ # XXX is not defined as a preprocessor macro
|
2018-09-29 08:25:14 +02:00
|
|
|
-wd5045 \ # Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
|
2016-08-06 14:59:30 +02:00
|
|
|
# Because Microsoft doesn't provide a way to suppress warnings in headers we will suppress
|
|
|
|
# all warnings we meet in headers globally
|
|
|
|
-wd4548 \
|
|
|
|
-wd4350 \
|
|
|
|
-wd4242 \
|
2016-08-06 22:04:45 +02:00
|
|
|
-wd4265 \
|
2016-08-06 22:20:09 +02:00
|
|
|
-wd4599 \
|
2016-08-06 22:35:30 +02:00
|
|
|
-wd4371 \
|
2016-08-07 14:12:08 +02:00
|
|
|
-wd4718 \
|
2019-04-06 09:25:14 +02:00
|
|
|
-wd4946 \
|
2020-01-14 18:13:16 +01:00
|
|
|
-wd4868 \ # compiler may not enforce left-to-right evaluation order in braced initializer list
|
2020-01-15 09:07:39 +01:00
|
|
|
-wd4866 \ # compiler may not enforce left-to-right evaluation order for call to 'C++17 operator'
|
|
|
|
-wd4571 \ # catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught
|
|
|
|
-wd5026 \ # move constructor was implicitly defined as deleted
|
|
|
|
-wd5027 \ # move assignment operator was implicitly defined as deleted
|
|
|
|
-wd5039 \ # pointer or reference to potentially throwing function passed to extern C function under -EHc.
|
2020-03-22 09:25:53 +01:00
|
|
|
-wd4774 \ # format string expected in argument 3 is not a string literal
|
2020-09-22 11:45:33 +02:00
|
|
|
-wd5204 \ # class has virtual functions, but its trivial destructor is not virtual; instances of objects derived
|
|
|
|
# from this class may not be destructed correctly
|
2021-06-29 10:57:21 +02:00
|
|
|
-wd5219 \ # implicit conversion from '<type>' to '<type>', possible loss of data
|
|
|
|
-wd5243 # 'type-name': using incomplete class 'class-name' can cause potential one definition rule violation due
|
|
|
|
# to ABI limitation
|
2014-10-27 15:29:31 +01:00
|
|
|
}
|