2012-12-11 21:08:15 +00:00
|
|
|
#
|
|
|
|
# W A R N I N G
|
|
|
|
# -------------
|
|
|
|
#
|
|
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
|
|
# implementation detail. It may change from version to version
|
|
|
|
# without notice, or even be removed.
|
|
|
|
#
|
|
|
|
# We mean it.
|
|
|
|
#
|
|
|
|
|
2012-10-23 20:15:43 +00:00
|
|
|
load(qt_build_paths)
|
2012-07-10 19:35:39 +00:00
|
|
|
|
2013-05-28 19:34:05 +00:00
|
|
|
!build_pass:git_build {
|
2014-09-15 15:30:42 +00:00
|
|
|
qtPrepareTool(QMAKE_SYNCQT, syncqt, , system)
|
2013-03-05 10:38:24 +00:00
|
|
|
minimal_syncqt {
|
|
|
|
QMAKE_SYNCQT += -minimal $$QMAKE_SYNCQT_OPTIONS
|
|
|
|
} else {
|
2016-08-05 11:35:39 +00:00
|
|
|
qtConfig(private_tests): \ # -developer-build
|
2013-03-05 10:38:24 +00:00
|
|
|
QMAKE_SYNCQT += -check-includes
|
|
|
|
}
|
2015-11-18 16:19:46 +00:00
|
|
|
for(mod, MODULE_INCNAME): \
|
|
|
|
QMAKE_SYNCQT += -module $$mod
|
2013-03-05 10:38:24 +00:00
|
|
|
QMAKE_SYNCQT += \
|
2018-02-12 16:56:32 +00:00
|
|
|
-version $$VERSION -outdir $$system_quote($$MODULE_BASE_OUTDIR) \
|
2019-04-15 10:41:52 +00:00
|
|
|
-builddir $$system_quote($$REAL_MODULE_BASE_OUTDIR) $$MODULE_SYNCQT_DIR
|
2012-09-18 16:19:29 +00:00
|
|
|
!silent: message($$QMAKE_SYNCQT)
|
|
|
|
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
|
2015-04-23 11:40:49 +00:00
|
|
|
|
2015-11-12 15:08:28 +00:00
|
|
|
!minimal_syncqt {
|
|
|
|
include-distclean.commands = \
|
|
|
|
$$QMAKE_DEL_TREE $$shell_quote($$shell_path($$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME))
|
|
|
|
QMAKE_EXTRA_TARGETS += include-distclean
|
|
|
|
DISTCLEAN_DEPS += include-distclean
|
|
|
|
}
|
2012-09-18 16:19:29 +00:00
|
|
|
}
|
|
|
|
|
2015-11-18 16:19:46 +00:00
|
|
|
# Pre-generated headers in the source tree (tar-ball) and
|
|
|
|
# - shadow build or
|
|
|
|
# - non-shadow non-prefix build of a module which is not qtbase
|
|
|
|
# (because the build-time generated headers all end up in qtbase).
|
|
|
|
!git_build: \
|
|
|
|
if(!equals(_PRO_FILE_PWD_, $$OUT_PWD) \
|
|
|
|
|if(!prefix_build:!equals(MODULE_BASE_INDIR, $$[QT_HOST_PREFIX]))): \
|
|
|
|
CONFIG += split_incpath
|
|
|
|
|
|
|
|
# To avoid stuffing the code with repetetive conditionals,
|
|
|
|
# we parametrize the names of the variables we assign to.
|
|
|
|
|
|
|
|
# Internal modules have no private part - they *are* private.
|
|
|
|
!internal_module: \
|
|
|
|
prv = _PRIVATE
|
|
|
|
|
|
|
|
# When doing a framework build with a prefix, the module needs to point
|
|
|
|
# into the frameworks' Headers dirs directly, as no shared include/ dir
|
|
|
|
# is installed.
|
|
|
|
# However, during the build, it needs to point into the shared include/
|
|
|
|
# dir, as the framework doesn't even exist yet. For bootstrapped modules
|
|
|
|
# which borrow headers from "proper" modules, this situation persists
|
|
|
|
# even beyond the module's own build. The implication of this is that
|
|
|
|
# qmake might never use a framework's headers in a non-prefix build,
|
|
|
|
# as there is no separate set of .pri files for users outside Qt.
|
2016-12-23 18:35:45 +00:00
|
|
|
# Borrowing is assumed to happen from modules which, in a framework build,
|
|
|
|
# actually are frameworks.
|
|
|
|
prefix_build:module_frameworks: \
|
2015-11-18 16:19:46 +00:00
|
|
|
fwd = _FWD
|
|
|
|
# When using a split include path during the build, the installed module's
|
|
|
|
# include path is also structurally different from that in the build dir.
|
|
|
|
prefix_build:split_incpath: \
|
|
|
|
sfwd = _FWD
|
|
|
|
|
|
|
|
ibase = \$\$QT_MODULE_INCLUDE_BASE
|
|
|
|
MODULE$${fwd}_INCLUDES = $$ibase
|
|
|
|
split_incpath {
|
|
|
|
bibase = $$val_escape(MODULE_BASE_OUTDIR)/include
|
|
|
|
MODULE$${sfwd}_INCLUDES += $$bibase
|
|
|
|
}
|
|
|
|
for(mod, MODULE_INCNAME) {
|
|
|
|
mibase = $$ibase/$$mod
|
|
|
|
MODULE$${fwd}_INCLUDES += $$mibase
|
|
|
|
MODULE$${fwd}$${prv}_INCLUDES += $$mibase/$$VERSION $$mibase/$$VERSION/$$mod
|
|
|
|
split_incpath {
|
|
|
|
mbibase = $$bibase/$$mod
|
|
|
|
MODULE$${sfwd}_INCLUDES += $$mbibase
|
|
|
|
generated_privates: \
|
|
|
|
MODULE$${sfwd}$${prv}_INCLUDES += $$mbibase/$$VERSION $$mbibase/$$VERSION/$$mod
|
|
|
|
}
|
2016-12-23 18:35:45 +00:00
|
|
|
prefix_build:module_frameworks {
|
2015-11-18 16:19:46 +00:00
|
|
|
mfbase = \$\$QT_MODULE_LIB_BASE/$${mod}.framework/Headers
|
|
|
|
MODULE_INCLUDES += $$mfbase
|
|
|
|
MODULE$${prv}_INCLUDES += $$mfbase/$$VERSION $$mfbase/$$VERSION/$$mod
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MODULE_INCLUDES += $$MODULE_AUX_INCLUDES
|
|
|
|
MODULE_PRIVATE_INCLUDES += $$MODULE_PRIVATE_AUX_INCLUDES
|
|
|
|
|
2013-03-05 10:38:24 +00:00
|
|
|
minimal_syncqt: return()
|
|
|
|
|
2018-03-20 20:21:38 +00:00
|
|
|
defineTest(syncQtResolve) {
|
|
|
|
out =
|
|
|
|
for (f, SYNCQT.$$1): \
|
|
|
|
out += $$absolute_path($$f, $$2)
|
|
|
|
SYNCQT.$$1 = $$out
|
|
|
|
export(SYNCQT.$$1)
|
|
|
|
}
|
|
|
|
|
2012-04-25 09:41:09 +00:00
|
|
|
#load up the headers info
|
2013-05-28 19:34:05 +00:00
|
|
|
git_build: \
|
|
|
|
INC_PATH = $$MODULE_BASE_OUTDIR
|
|
|
|
else: \
|
2013-06-08 09:58:54 +00:00
|
|
|
INC_PATH = $$MODULE_BASE_INDIR
|
2013-05-28 19:34:05 +00:00
|
|
|
include($$INC_PATH/include/$$MODULE_INCNAME/headers.pri, "", true)
|
2018-03-20 20:21:38 +00:00
|
|
|
syncQtResolve(HEADER_FILES, $$_PRO_FILE_PWD_)
|
|
|
|
syncQtResolve(PRIVATE_HEADER_FILES, $$_PRO_FILE_PWD_)
|
|
|
|
syncQtResolve(QPA_HEADER_FILES, $$_PRO_FILE_PWD_)
|
|
|
|
syncQtResolve(GENERATED_HEADER_FILES, $$INC_PATH/include/$$MODULE_INCNAME)
|
2015-12-16 11:47:01 +00:00
|
|
|
!lib_bundle: \ # Headers are embedded into the bundle, so don't install them separately.
|
|
|
|
CONFIG += qt_install_headers
|
2015-11-10 17:40:04 +00:00
|
|
|
|
|
|
|
alien_syncqt: return()
|
2012-04-25 09:41:09 +00:00
|
|
|
|
2016-08-29 15:41:28 +00:00
|
|
|
MODULE_INC_OUTDIR = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME
|
|
|
|
|
2018-05-02 16:07:05 +00:00
|
|
|
isEmpty(MODULE_CFG_FILE): MODULE_CFG_FILE = qt$${MODULE}-config
|
|
|
|
exists($$OUT_PWD/$${MODULE_CFG_FILE}.h) {
|
2018-09-10 15:33:09 +00:00
|
|
|
fwd_rel = $$relative_path($$OUT_PWD, $$REAL_MODULE_BASE_OUTDIR)
|
Modularize the new configure system (infrastructure part)
This change implements the required infrastructure to modularize the new
configuration system.
This requires a hierarchy of configuration files, both for handling
multiple repositories and for individual modules inside the same
repository.
When configuring, they all need to get loaded first, as command line
processing needs to know about all possible command line options.
When the command line has been processed, the individual configuration
files need to get processed one after the other and independently from
each other.
Configure is now automatically invoked when building the a project
tree's "root" project; this works with both modular and top-level builds
of Qt (the latter with an according change in the super repo). As an
immediate consequence, the -skip option moves to the super repo with a
different implementation, as configuration is now done after the repo
list is determined. The option belongs there anyway.
This commit also adds an optional testDir entry to the json file. Like
this, we can still have all configure tests in qtbase/config.tests and
the configuration file in, e.g., corelib can reference those.
The files section can now be left out as long as a 'module' entry is
present, specifying the module name. The names of the files to generate
can then be deduced from that name. We still need to be able to specify
names directly for the global configuration files.
qtConfig() now also queries features which are module-specific. As it is
sometimes necessary to query the configuration of modules which should
not be actually linked (and cannot in the case of subdirs projects), the
new variable QT_FOR_CONFIG which allows specifying configuration-only
dependencies is introduced.
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Id1b518a3aa34044748b87fb8fac14d79653f6b18
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 13:45:44 +00:00
|
|
|
SYNCQT.INJECTIONS += \
|
2018-05-02 16:07:05 +00:00
|
|
|
$$fwd_rel/$${MODULE_CFG_FILE}.h:$${MODULE_CFG_FILE}.h \
|
|
|
|
$$fwd_rel/$${MODULE_CFG_FILE}_p.h:$$MODULE_VERSION/$$MODULE_INCNAME/private/$${MODULE_CFG_FILE}_p.h
|
Modularize the new configure system (infrastructure part)
This change implements the required infrastructure to modularize the new
configuration system.
This requires a hierarchy of configuration files, both for handling
multiple repositories and for individual modules inside the same
repository.
When configuring, they all need to get loaded first, as command line
processing needs to know about all possible command line options.
When the command line has been processed, the individual configuration
files need to get processed one after the other and independently from
each other.
Configure is now automatically invoked when building the a project
tree's "root" project; this works with both modular and top-level builds
of Qt (the latter with an according change in the super repo). As an
immediate consequence, the -skip option moves to the super repo with a
different implementation, as configuration is now done after the repo
list is determined. The option belongs there anyway.
This commit also adds an optional testDir entry to the json file. Like
this, we can still have all configure tests in qtbase/config.tests and
the configuration file in, e.g., corelib can reference those.
The files section can now be left out as long as a 'module' entry is
present, specifying the module name. The names of the files to generate
can then be deduced from that name. We still need to be able to specify
names directly for the global configuration files.
qtConfig() now also queries features which are module-specific. As it is
sometimes necessary to query the configuration of modules which should
not be actually linked (and cannot in the case of subdirs projects), the
new variable QT_FOR_CONFIG which allows specifying configuration-only
dependencies is introduced.
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Id1b518a3aa34044748b87fb8fac14d79653f6b18
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 13:45:44 +00:00
|
|
|
}
|
|
|
|
|
2014-02-03 21:22:14 +00:00
|
|
|
for (injection, SYNCQT.INJECTIONS) {
|
|
|
|
injects = $$split(injection, :)
|
2018-09-10 15:33:09 +00:00
|
|
|
dst_hdr = $$absolute_path($$member(injects, 0), $$REAL_MODULE_BASE_OUTDIR)
|
2017-03-20 11:08:14 +00:00
|
|
|
ofwd_hdr = $$member(injects, 1)
|
|
|
|
fwd_hdr = $$replace(ofwd_hdr, ^\\^, )
|
2016-08-29 15:41:28 +00:00
|
|
|
MAIN_FWD = $$MODULE_INC_OUTDIR/$$fwd_hdr
|
2016-08-16 15:51:00 +00:00
|
|
|
MAIN_FWD_CONT = '$${LITERAL_HASH}include "$$relative_path($$dst_hdr, $$dirname(MAIN_FWD))"'
|
2016-07-14 14:50:02 +00:00
|
|
|
write_file($$MAIN_FWD, MAIN_FWD_CONT)|error()
|
2017-03-20 11:08:14 +00:00
|
|
|
equals(fwd_hdr, ofwd_hdr): touch($$MAIN_FWD, $$dst_hdr)
|
2015-04-23 11:40:49 +00:00
|
|
|
!git_build: QMAKE_DISTCLEAN += $$MAIN_FWD
|
2018-04-19 15:12:15 +00:00
|
|
|
!contains(ofwd_hdr, .*/private/.*): \
|
|
|
|
SYNCQT.INJECTED_HEADER_FILES += $$dst_hdr
|
|
|
|
else: \
|
|
|
|
SYNCQT.INJECTED_PRIVATE_HEADER_FILES += $$dst_hdr
|
2014-02-03 21:22:14 +00:00
|
|
|
injects = $$member(injects, 2, -1)
|
|
|
|
for (inject, injects) {
|
2016-08-29 15:41:28 +00:00
|
|
|
CLASS_FWD = $$MODULE_INC_OUTDIR/$$inject
|
2014-02-03 21:22:14 +00:00
|
|
|
CLASS_FWD_CONT = '$${LITERAL_HASH}include "$$fwd_hdr"'
|
2016-07-14 14:50:02 +00:00
|
|
|
write_file($$CLASS_FWD, CLASS_FWD_CONT)|error()
|
2017-03-20 11:08:14 +00:00
|
|
|
touch($$CLASS_FWD, $$MAIN_FWD)
|
2015-04-23 11:40:49 +00:00
|
|
|
!git_build: QMAKE_DISTCLEAN += $$CLASS_FWD
|
2018-04-19 16:19:13 +00:00
|
|
|
SYNCQT.INJECTED_HEADER_FILES += $$CLASS_FWD
|
2014-02-03 21:22:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-11-30 14:32:36 +00:00
|
|
|
autogen_warning = \
|
2013-06-08 09:58:54 +00:00
|
|
|
"/* This file was generated by qmake with the info from <root>/$$relative_path($$_PRO_FILE_, $$MODULE_BASE_INDIR). */"
|
2012-11-30 14:32:36 +00:00
|
|
|
|
2013-05-28 17:09:24 +00:00
|
|
|
# Create a module master depends header
|
|
|
|
MODULE_MASTER_DEPS_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$${MODULE_INCNAME}Depends
|
|
|
|
!build_pass {
|
|
|
|
MODULE_MASTER_DEPS_HEADER_CONT = $$autogen_warning
|
2014-06-15 05:55:05 +00:00
|
|
|
MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}ifdef __cplusplus /* create empty PCH in C mode */"
|
2013-05-28 17:09:24 +00:00
|
|
|
for(dep, MODULE_DEPENDS) {
|
2014-10-13 12:47:13 +00:00
|
|
|
depname = $$eval(QT.$${dep}.master_header)
|
|
|
|
isEmpty(depname): \
|
|
|
|
depname = $$eval(QT.$${dep}.name)
|
2013-05-28 17:09:24 +00:00
|
|
|
MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}include <$$depname/$$depname>"
|
|
|
|
}
|
2014-06-15 05:55:05 +00:00
|
|
|
MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}endif"
|
2016-07-14 14:50:02 +00:00
|
|
|
write_file($$MODULE_MASTER_DEPS_HEADER, MODULE_MASTER_DEPS_HEADER_CONT)|error()
|
2015-04-23 11:40:49 +00:00
|
|
|
!git_build: QMAKE_DISTCLEAN += $$MODULE_MASTER_DEPS_HEADER
|
2013-05-28 17:09:24 +00:00
|
|
|
}
|
|
|
|
SYNCQT.HEADER_FILES += $$MODULE_MASTER_DEPS_HEADER
|
|
|
|
|
2017-04-16 17:51:15 +00:00
|
|
|
# Automatically enable precompiled headers for Qt modules with more than 2 sources
|
|
|
|
combined_SOURCES = $$SOURCES $$OBJECTIVE_SOURCES
|
|
|
|
count(combined_SOURCES, 2, >) {
|
|
|
|
# except for Gcc/Windows: Larger precompiled headers crash cc1plus.exe
|
|
|
|
# (e.g. with i686-4.8.2-release-posix-dwarf-rt_v3-rev3)
|
|
|
|
!if(gcc:equals(QMAKE_HOST.os, Windows)):!equals(TEMPLATE, aux) {
|
|
|
|
!defined(PRECOMPILED_HEADER, "var"): PRECOMPILED_HEADER = $$MODULE_MASTER_DEPS_HEADER
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
CONFIG -= precompile_header
|
2014-06-25 15:09:08 +00:00
|
|
|
}
|
2017-04-16 17:51:15 +00:00
|
|
|
unset(combined_SOURCES)
|
2014-03-01 07:15:37 +00:00
|
|
|
|
2012-12-22 21:12:02 +00:00
|
|
|
headersclean:!internal_module {
|
|
|
|
# Make sure that the header compiles with our strict options
|
|
|
|
hcleanDEFS = -DQT_NO_CAST_TO_ASCII=1 \
|
|
|
|
-DQT_NO_CAST_FROM_ASCII=1 \
|
2017-04-24 15:10:08 +00:00
|
|
|
-UQT_RESTRICTED_CAST_FROM_ASCII \
|
2012-12-22 21:12:02 +00:00
|
|
|
-DQT_STRICT_ITERATORS \
|
|
|
|
-DQT_NO_URL_CAST_FROM_STRING=1 \
|
|
|
|
-DQT_NO_CAST_FROM_BYTEARRAY=1 \
|
|
|
|
-DQT_NO_KEYWORDS=1 \
|
2015-10-08 19:53:39 +00:00
|
|
|
-DQT_USE_QSTRINGBUILDER \
|
2012-12-22 21:12:02 +00:00
|
|
|
-DQT_USE_FAST_OPERATOR_PLUS \
|
|
|
|
-Dsignals=int \
|
|
|
|
-Dslots=int \
|
|
|
|
-Demit=public: \
|
|
|
|
-Dforeach=public: \
|
|
|
|
-Dforever=public:
|
|
|
|
|
2017-03-23 22:11:15 +00:00
|
|
|
gcc:!rim_qcc {
|
2012-12-22 21:12:02 +00:00
|
|
|
# Turn on some extra warnings not found in -Wall -Wextra.
|
|
|
|
# Common to GCC, Clang and ICC (and other compilers that masquerade as GCC):
|
|
|
|
hcleanFLAGS = -Wall -Wextra -Werror \
|
2016-12-16 20:56:23 +00:00
|
|
|
-Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal \
|
2012-12-22 21:12:02 +00:00
|
|
|
-Wnon-virtual-dtor -Wpointer-arith -Wformat-security \
|
|
|
|
-Wno-long-long -Wno-variadic-macros -pedantic-errors
|
|
|
|
|
|
|
|
intel_icc {
|
|
|
|
# these warnings are disabled because explicit constructors with zero or
|
|
|
|
# multiple arguments are permitted in C++11:
|
|
|
|
# 2304: non-explicit constructor with single argument may cause implicit type conversion
|
|
|
|
# 2305: declaration of 'explicit' constructor without a single argument is redundant
|
|
|
|
hcleanFLAGS += -wd2304,2305
|
|
|
|
greaterThan(QT_ICC_MAJOR_VERSION, 13) {
|
|
|
|
# ICC 14+ has a bug with -Wshadow, emitting it for cases where there's no shadowing
|
|
|
|
# (issue ID 0000698329, task DPD200245740)
|
|
|
|
hcleanFLAGS -= -Wshadow
|
|
|
|
}
|
|
|
|
} else {
|
2015-03-07 17:09:11 +00:00
|
|
|
# options accepted by GCC and Clang
|
|
|
|
hcleanFLAGS += -Wchar-subscripts -Wold-style-cast
|
2012-12-22 21:12:02 +00:00
|
|
|
|
|
|
|
!contains(QT_ARCH, arm):!contains(QT_ARCH, mips): \
|
|
|
|
hcleanFLAGS += -Wcast-align
|
2015-06-30 20:01:17 +00:00
|
|
|
|
2017-03-21 07:40:11 +00:00
|
|
|
clang_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
|
|
|
|
versionAtLeast(clang_ver, 3.8): hcleanFLAGS += -Wdouble-promotion
|
2016-11-18 13:05:34 +00:00
|
|
|
|
2015-06-30 20:01:17 +00:00
|
|
|
!clang {
|
|
|
|
# options accepted only by GCC
|
|
|
|
|
2017-03-21 07:40:11 +00:00
|
|
|
gcc_ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION}
|
|
|
|
versionAtLeast(gcc_ver, 4.5): hcleanFLAGS += -Wdouble-promotion
|
2017-09-22 07:02:16 +00:00
|
|
|
versionAtLeast(gcc_ver, 4.9): hcleanFLAGS += -Wfloat-conversion
|
2018-12-10 14:21:07 +00:00
|
|
|
# GCC 9 has a lot of false positives relating to this, so disable completely
|
|
|
|
greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-deprecated-copy
|
|
|
|
# GCC 9 introduced this
|
|
|
|
greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-redundant-move
|
|
|
|
# GCC 9 introduced this
|
|
|
|
greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-format-overflow
|
|
|
|
# GCC 9 introduced this
|
|
|
|
greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-init-list-lifetime
|
2017-03-21 07:40:11 +00:00
|
|
|
|
2015-06-30 20:01:17 +00:00
|
|
|
c++11 {
|
|
|
|
# only enabled for actual c++11 builds due to
|
|
|
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52806
|
|
|
|
hcleanFLAGS += -Wzero-as-null-pointer-constant
|
|
|
|
}
|
|
|
|
}
|
2012-12-22 21:12:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Use strict mode C++11 or C++98, with no GNU extensions (see -pedantic-errors above).
|
|
|
|
# The module might set CONFIG += c++11, but it might also change QMAKE_CXXFLAGS_CXX11
|
|
|
|
# or the module (or the mkspec) can set the C++11 flag on QMAKE_CXXFLAGS
|
|
|
|
# (or QMAKE_CXXFLAGS_{RELEASE,DEBUG} but that's unlikely).
|
|
|
|
c++11:contains(QMAKE_CXXFLAGS_CXX11, -std=gnu++11) {
|
|
|
|
hcleanFLAGS += -std=c++11
|
|
|
|
} else: contains(QMAKE_CXXFLAGS, -std=gnu++11) {
|
|
|
|
hcleanFLAGS += -std=c++11
|
|
|
|
} else: c++11:contains(QMAKE_CXXFLAGS_CXX11, -std=gnu++0x) {
|
|
|
|
hcleanFLAGS += -std=c++0x
|
|
|
|
} else: contains(QMAKE_CXXFLAGS, -std=gnu++0x) {
|
|
|
|
hcleanFLAGS += -std=c++0x
|
|
|
|
} else: !c++11:!contains(QMAKE_CXXFLAGS, -std=c++0x):!contains(QMAKE_CXXFLAGS, -std=c++11) {
|
|
|
|
hcleanFLAGS += -std=c++98
|
|
|
|
}
|
|
|
|
|
2019-06-13 12:10:37 +00:00
|
|
|
hcleanCOMMAND = $(CXX) -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -xc++ ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
2017-03-14 05:56:56 +00:00
|
|
|
} else: msvc:!intel_icl {
|
2012-12-22 21:12:02 +00:00
|
|
|
# 4180: qualifier applied to function type has no meaning; ignored
|
|
|
|
# 4458: declaration of 'identifier' hides class member
|
|
|
|
# -Za enables strict standards behavior, but we can't add it because
|
|
|
|
# <windows.h> and <GL.h> violate the standards.
|
|
|
|
hcleanFLAGS = -WX -W3 -wd4180 -wd4458
|
2017-03-22 14:47:14 +00:00
|
|
|
|
|
|
|
# MSVC 2015 (compiler version 19.0):
|
|
|
|
# 4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc
|
|
|
|
greaterThan(QMAKE_MSC_VER, 18): hcleanFLAGS += -wd4577
|
|
|
|
|
2019-06-13 12:10:37 +00:00
|
|
|
hcleanCOMMAND = $(CXX) -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -FI${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT} \
|
2012-12-22 21:12:02 +00:00
|
|
|
$$[QT_INSTALL_DATA/src]/mkspecs/features/data/dummy.cpp
|
|
|
|
}
|
|
|
|
|
2016-08-05 11:35:39 +00:00
|
|
|
!isEmpty(hcleanCOMMAND):if(!qtConfig(debug_and_release)|CONFIG(release, debug|release)) {
|
2016-08-31 13:39:30 +00:00
|
|
|
CLEAN_HEADERS =
|
|
|
|
for (h, SYNCQT.CLEAN_HEADER_FILES) {
|
|
|
|
hh = $$split(h, :)
|
|
|
|
hr = $$member(hh, 1)
|
|
|
|
isEmpty(hr)|qtConfig($$hr): \
|
|
|
|
CLEAN_HEADERS += $$member(hh, 0)
|
|
|
|
}
|
|
|
|
CLEAN_HEADERS -= $$HEADERSCLEAN_EXCLUDE
|
2012-12-22 21:12:02 +00:00
|
|
|
header_check.dependency_type = TYPE_C
|
|
|
|
header_check.CONFIG += no_link
|
|
|
|
header_check.output = ${QMAKE_VAR_OBJECTS_DIR}header_${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
|
2016-08-31 13:39:30 +00:00
|
|
|
header_check.input = CLEAN_HEADERS
|
2012-12-22 21:12:02 +00:00
|
|
|
header_check.variable_out = PRE_TARGETDEPS
|
|
|
|
header_check.name = headercheck ${QMAKE_FILE_IN}
|
|
|
|
header_check.commands = $$hcleanCOMMAND
|
|
|
|
silent:header_check.commands = @echo compiling[header] ${QMAKE_FILE_IN} && $$hcleanCOMMAND
|
|
|
|
QMAKE_EXTRA_COMPILERS += header_check
|
|
|
|
}
|
|
|
|
unset(hcleanCOMMAND)
|
|
|
|
unset(hcleanFLAGS)
|
|
|
|
unset(hcleanDEFS)
|
|
|
|
}
|