2016-06-11 20:49:01 +00:00
|
|
|
# custom command line handling
|
|
|
|
|
replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without
modifying (or wrapping) the spec itself. linux distributors do this on a
regular basis.
so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat
autoconf-like fashion. however, over time, this approach proved
problematic: the concept doesn't mix particularly well with mkspecs to
start with, is unexpected (and therefore causes frustration), and
doesn't mix well with cross-building (at least the way it was realized).
ironically, it was implemented this way (quite a while ago) upon my
explicit request ...
the new mechanism uses explicit variable manipulations on the configure
command line, just like qmake itself understands. as it happens, this is
again quite similar to autoconf-generated configure scripts. however,
this time around we don't pretend to be actually autoconf-like, so we
also don't try to map any variable names (some of which have different
semantics anyway).
this commit also eliminates the last use of the QMakeVar() function,
so delete it and the underlying infrastructure.
Task-number: QTBUG-32530
Task-number: QTBUG-42962
Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-06 11:58:53 +00:00
|
|
|
defineTest(qtConfCommandline_qmakeArgs) {
|
|
|
|
contains(1, QMAKE_[A-Z_]+ *[-+]?=.*) {
|
|
|
|
config.input.qmakeArgs += $$1
|
|
|
|
export(config.input.qmakeArgs)
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtConfCommandline_cxxstd) {
|
2016-08-14 07:48:55 +00:00
|
|
|
msvc: \
|
|
|
|
qtConfAddError("Command line option -c++std is not supported with MSVC compilers.")
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
arg = $${1}
|
|
|
|
val = $${2}
|
|
|
|
isEmpty(val): val = $$qtConfGetNextCommandlineArg()
|
|
|
|
!contains(val, "^-.*"):!isEmpty(val) {
|
|
|
|
contains(val, "(c\+\+)?11") {
|
|
|
|
qtConfCommandlineSetInput("c++14", "no")
|
|
|
|
} else: contains(val, "(c\+\+)?(14|1y)") {
|
|
|
|
qtConfCommandlineSetInput("c++14", "yes")
|
|
|
|
qtConfCommandlineSetInput("c++1z", "no")
|
|
|
|
} else: contains(val, "(c\+\+)?(1z)") {
|
|
|
|
qtConfCommandlineSetInput("c++14", "yes")
|
|
|
|
qtConfCommandlineSetInput("c++1z", "yes")
|
|
|
|
} else {
|
2016-08-01 08:10:32 +00:00
|
|
|
qtConfAddError("Invalid argument $$val to command line parameter $$arg")
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
} else {
|
2016-08-01 08:10:32 +00:00
|
|
|
qtConfAddError("Missing argument to command line parameter $$arg")
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfCommandline_sanitize) {
|
|
|
|
arg = $${1}
|
|
|
|
val = $${2}
|
|
|
|
isEmpty(val): val = $$qtConfGetNextCommandlineArg()
|
|
|
|
!contains(val, "^-.*"):!isEmpty(val) {
|
|
|
|
equals(val, "address") {
|
|
|
|
qtConfCommandlineSetInput("sanitize_address", "yes")
|
|
|
|
} else: equals(val, "thread") {
|
|
|
|
qtConfCommandlineSetInput("sanitize_thread", "yes")
|
|
|
|
} else: equals(val, "memory") {
|
|
|
|
qtConfCommandlineSetInput("sanitize_memory", "yes")
|
|
|
|
} else: equals(val, "undefined") {
|
|
|
|
qtConfCommandlineSetInput("sanitize_undefined", "yes")
|
|
|
|
} else {
|
2016-08-01 08:10:32 +00:00
|
|
|
qtConfAddError("Invalid argument $$val to command line parameter $$arg")
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
} else {
|
2016-08-01 08:10:32 +00:00
|
|
|
qtConfAddError("Missing argument to command line parameter $$arg")
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# callbacks
|
|
|
|
|
|
|
|
defineReplace(qtConfFunc_crossCompile) {
|
|
|
|
spec = $$[QMAKE_SPEC]
|
|
|
|
!equals(spec, $$[QMAKE_XSPEC]): return(true)
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
# custom tests
|
|
|
|
|
2016-06-29 09:39:27 +00:00
|
|
|
defineTest(qtConfTest_architecture) {
|
|
|
|
!qtConfTest_compile($${1}): \
|
|
|
|
error("Could not determine $$eval($${1}.description). See config.log for details.")
|
|
|
|
|
|
|
|
test = $$eval($${1}.test)
|
|
|
|
test_out_dir = $$shadowed($$QMAKE_CONFIG_TESTS_DIR/$$test)
|
2016-07-15 16:23:05 +00:00
|
|
|
unix:exists($$test_out_dir/arch): \
|
2016-06-29 09:39:27 +00:00
|
|
|
content = $$cat($$test_out_dir/arch, blob)
|
2016-07-15 16:23:05 +00:00
|
|
|
else: win32:exists($$test_out_dir/arch.exe): \
|
2016-06-29 09:39:27 +00:00
|
|
|
content = $$cat($$test_out_dir/arch.exe, blob)
|
2016-07-15 16:23:05 +00:00
|
|
|
else: android:exists($$test_out_dir/libarch.so): \
|
2016-06-29 09:39:27 +00:00
|
|
|
content = $$cat($$test_out_dir/libarch.so, blob)
|
|
|
|
else: \
|
|
|
|
error("$$eval($${1}.description) detection binary not found.")
|
|
|
|
|
|
|
|
arch_magic = ".*==Qt=magic=Qt== Architecture:([^\\0]*).*"
|
|
|
|
subarch_magic = ".*==Qt=magic=Qt== Sub-architecture:([^\\0]*).*"
|
|
|
|
|
|
|
|
!contains(content, $$arch_magic)|!contains(content, $$subarch_magic): \
|
|
|
|
error("$$eval($${1}.description) detection binary does not contain expected data.")
|
|
|
|
|
|
|
|
$${1}.arch = $$replace(content, $$arch_magic, "\\1")
|
|
|
|
$${1}.subarch = $$replace(content, $$subarch_magic, "\\1")
|
|
|
|
$${1}.subarch = $$split($${1}.subarch, " ")
|
|
|
|
export($${1}.arch)
|
|
|
|
export($${1}.subarch)
|
|
|
|
qtLog("Detected architecture: $$eval($${1}.arch) ($$eval($${1}.subarch))")
|
|
|
|
|
2016-08-16 18:03:54 +00:00
|
|
|
$${1}.cache += arch subarch
|
|
|
|
export($${1}.cache)
|
2016-06-29 09:39:27 +00:00
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtConfTest_avx_test_apple_clang) {
|
|
|
|
!*g++*:!*-clang*: return(true)
|
|
|
|
|
2016-08-01 11:04:24 +00:00
|
|
|
qtRunLoggedCommand("$$QMAKE_CXX --version", compiler)|return(false)
|
2016-06-11 20:49:01 +00:00
|
|
|
contains(compiler, "Apple clang version [23]") {
|
|
|
|
# Some clang versions produce internal compiler errors compiling Qt AVX code
|
|
|
|
return(false)
|
|
|
|
} else {
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfTest_gnumake) {
|
|
|
|
make = $$qtConfFindInPath("gmake")
|
|
|
|
isEmpty(make): make = $$qtConfFindInPath("make")
|
|
|
|
!isEmpty(make) {
|
2016-08-01 11:04:24 +00:00
|
|
|
qtRunLoggedCommand("$$make -v", version)|return(false)
|
2016-06-11 20:49:01 +00:00
|
|
|
contains(version, "^GNU Make.*"): return(true)
|
|
|
|
}
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfTest_detectPkgConfig) {
|
|
|
|
pkgConfig = $$getenv("PKG_CONFIG")
|
|
|
|
!isEmpty(pkgConfig): {
|
|
|
|
qtLog("Found pkg-config from environment variable: $$pkgConfig")
|
|
|
|
} else {
|
|
|
|
pkgConfig = $$PKG_CONFIG
|
|
|
|
|
|
|
|
!isEmpty(pkgConfig) {
|
|
|
|
qtLog("Found pkg-config from mkspec: $$pkgConfig")
|
|
|
|
} else {
|
|
|
|
pkgConfig = $$qtConfFindInPath("pkg-config")
|
|
|
|
|
|
|
|
isEmpty(pkgConfig): \
|
|
|
|
return(false)
|
|
|
|
|
|
|
|
qtLog("Found pkg-config from path: $$pkgConfig")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$$qtConfEvaluate("features.cross_compile") {
|
|
|
|
# cross compiling, check that pkg-config is set up sanely
|
|
|
|
sysroot = $$config.input.sysroot
|
|
|
|
|
|
|
|
pkgConfigLibdir = $$getenv("PKG_CONFIG_LIBDIR")
|
|
|
|
isEmpty(pkgConfigLibdir) {
|
|
|
|
isEmpty(sysroot) {
|
|
|
|
qtConfAddWarning("Cross compiling without sysroot. Disabling pkg-config")
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
!exists("$$sysroot/usr/lib/pkgconfig") {
|
|
|
|
qtConfAddWarning( \
|
|
|
|
"Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and" \
|
|
|
|
"the host's .pc files would be used (even if you set PKG_CONFIG_PATH)." \
|
|
|
|
"Set this variable to the directory that contains target .pc files" \
|
|
|
|
"for pkg-config to function correctly when cross-compiling or" \
|
|
|
|
"use -pkg-config to override this test.")
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
pkgConfigLibdir = $$sysroot/usr/lib/pkgconfig:$$sysroot/usr/share/pkgconfig
|
|
|
|
gcc {
|
2016-08-01 11:04:24 +00:00
|
|
|
qtRunLoggedCommand("$$QMAKE_CXX -dumpmachine", gccMachineDump): \
|
|
|
|
!isEmpty(gccMachineDump): \
|
2016-06-11 20:49:01 +00:00
|
|
|
pkgConfigLibdir = "$$pkgConfigLibdir:$$sysroot/usr/lib/$$gccMachineDump/pkgconfig"
|
|
|
|
}
|
|
|
|
|
|
|
|
qtConfAddNote("PKG_CONFIG_LIBDIR automatically set to $$pkgConfigLibdir")
|
|
|
|
}
|
|
|
|
pkgConfigSysrootDir = $$getenv("PKG_CONFIG_SYSROOT_DIR")
|
|
|
|
isEmpty(pkgConfigSysrootDir) {
|
|
|
|
isEmpty(sysroot) {
|
|
|
|
qtConfAddWarning( \
|
|
|
|
"Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set." \
|
|
|
|
"Set this variable to your sysroot for pkg-config to function correctly when" \
|
|
|
|
"cross-compiling or use -pkg-config to override this test.")
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
pkgConfigSysrootDir = $$sysroot
|
|
|
|
qtConfAddNote("PKG_CONFIG_SYSROOT_DIR automatically set to $$pkgConfigSysrootDir")
|
|
|
|
}
|
|
|
|
$${1}.pkgConfigLibdir = $$pkgConfigLibdir
|
|
|
|
export($${1}.pkgConfigLibdir)
|
|
|
|
$${1}.pkgConfigSysrootDir = $$pkgConfigSysrootDir
|
|
|
|
export($${1}.pkgConfigSysrootDir)
|
2016-08-16 18:03:54 +00:00
|
|
|
$${1}.cache += pkgConfigLibdir pkgConfigSysrootDir
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
$${1}.pkgConfig = $$pkgConfig
|
|
|
|
export($${1}.pkgConfig)
|
2016-08-16 18:03:54 +00:00
|
|
|
$${1}.cache += pkgConfig
|
|
|
|
export($${1}.cache)
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfTest_neon) {
|
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
|
|
|
contains($${currentConfig}.tests.architecture.subarch, "neon"): return(true)
|
2016-06-11 20:49:01 +00:00
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
2016-06-22 07:52:41 +00:00
|
|
|
defineTest(qtConfTest_buildParts) {
|
|
|
|
parts = $$config.input.make
|
|
|
|
isEmpty(parts) {
|
|
|
|
parts = libs examples
|
|
|
|
|
|
|
|
$$qtConfEvaluate("features.developer-build"): \
|
|
|
|
parts += tests
|
|
|
|
!$$qtConfEvaluate("features.cross_compile"): \
|
|
|
|
parts += tools
|
|
|
|
}
|
|
|
|
|
|
|
|
parts -= $$config.input.nomake
|
|
|
|
|
|
|
|
# always add libs, as it's required to build Qt
|
|
|
|
parts *= libs
|
|
|
|
|
|
|
|
$${1}.value = $$parts
|
|
|
|
export($${1}.value)
|
2016-08-24 11:39:15 +00:00
|
|
|
$${1}.cache = -
|
2016-08-16 18:03:54 +00:00
|
|
|
export($${1}.cache)
|
2016-06-22 07:52:41 +00:00
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtConfTest_checkCompiler) {
|
|
|
|
contains(QMAKE_CXX, ".*clang.*") {
|
2016-08-01 11:04:24 +00:00
|
|
|
qtRunLoggedCommand("$$QMAKE_CXX -v 2>&1", versionstr)|return(false)
|
2016-06-11 20:49:01 +00:00
|
|
|
contains(versionstr, "^Apple (clang|LLVM) version .*") {
|
|
|
|
$${1}.compilerDescription = "Apple Clang"
|
|
|
|
$${1}.compilerId = "apple_clang"
|
2016-06-24 12:15:18 +00:00
|
|
|
$${1}.compilerVersion = $$replace(versionstr, "^Apple (clang|LLVM) version ([0-9.]+).*$", "\\2")
|
2016-06-11 20:49:01 +00:00
|
|
|
} else: contains(versionstr, ".*clang version.*") {
|
|
|
|
$${1}.compilerDescription = "Clang"
|
|
|
|
$${1}.compilerId = "clang"
|
|
|
|
$${1}.compilerVersion = $$replace(versionstr, "^.*clang version ([0-9.]+).*", "\\1")
|
|
|
|
} else {
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
} else: contains(QMAKE_CXX, ".*g\\+\\+.*") {
|
2016-08-01 11:04:24 +00:00
|
|
|
qtRunLoggedCommand("$$QMAKE_CXX -dumpversion", version)|return(false)
|
2016-06-11 20:49:01 +00:00
|
|
|
$${1}.compilerDescription = "GCC"
|
|
|
|
$${1}.compilerId = "gcc"
|
2016-08-01 11:04:24 +00:00
|
|
|
$${1}.compilerVersion = $$version
|
2016-06-11 20:49:01 +00:00
|
|
|
} else: contains(QMAKE_CXX, ".*icpc" ) {
|
2016-08-01 11:04:24 +00:00
|
|
|
qtRunLoggedCommand("$$QMAKE_CXX -v", version)|return(false)
|
2016-06-11 20:49:01 +00:00
|
|
|
$${1}.compilerDescription = "ICC"
|
|
|
|
$${1}.compilerId = "icc"
|
|
|
|
$${1}.compilerVersion = $$replace(version, "icpc version ([0-9.]+).*", "\\1")
|
2016-06-27 08:56:50 +00:00
|
|
|
} else: msvc {
|
2016-09-01 08:05:55 +00:00
|
|
|
qtRunLoggedCommand("$$QMAKE_CXX /? 2>&1", version)|return(false)
|
|
|
|
version = "$$version"
|
2016-06-27 08:56:50 +00:00
|
|
|
$${1}.compilerDescription = "MSVC"
|
|
|
|
$${1}.compilerId = "cl"
|
2016-09-01 08:05:55 +00:00
|
|
|
$${1}.compilerVersion = $$replace(version, "^.*Compiler Version ([0-9.]+) for.*$", "\\1")
|
2016-06-11 20:49:01 +00:00
|
|
|
} else {
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
$${1}.compilerDescription += $$eval($${1}.compilerVersion)
|
|
|
|
export($${1}.compilerDescription)
|
|
|
|
export($${1}.compilerId)
|
|
|
|
export($${1}.compilerVersion)
|
2016-08-16 18:03:54 +00:00
|
|
|
$${1}.cache += compilerDescription compilerId compilerVersion
|
|
|
|
export($${1}.cache)
|
2016-06-11 20:49:01 +00:00
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
# custom outputs
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_shared) {
|
|
|
|
!$${2}: return()
|
|
|
|
|
|
|
|
# export this here, so later tests can use it
|
|
|
|
CONFIG += shared
|
|
|
|
export(CONFIG)
|
|
|
|
}
|
|
|
|
|
2016-06-29 09:39:27 +00:00
|
|
|
defineTest(qtConfOutput_architecture) {
|
|
|
|
arch = $$qtConfEvaluate("tests.architecture.arch")
|
|
|
|
|
|
|
|
$$qtConfEvaluate("features.cross_compile") {
|
|
|
|
host_arch = $$qtConfEvaluate("tests.host_architecture.arch")
|
|
|
|
|
|
|
|
privatePro = \
|
|
|
|
"host_build {" \
|
|
|
|
" QT_CPU_FEATURES.$$host_arch = $$qtConfEvaluate('tests.host_architecture.subarch')" \
|
|
|
|
"} else {" \
|
|
|
|
" QT_CPU_FEATURES.$$arch = $$qtConfEvaluate('tests.architecture.subarch')" \
|
|
|
|
"}"
|
|
|
|
publicPro = \
|
|
|
|
"host_build {" \
|
|
|
|
" QT_ARCH = $$host_arch" \
|
|
|
|
" QT_TARGET_ARCH = $$arch" \
|
|
|
|
"} else {" \
|
|
|
|
" QT_ARCH = $$arch" \
|
|
|
|
"}"
|
|
|
|
|
|
|
|
} else {
|
|
|
|
privatePro = \
|
|
|
|
"QT_CPU_FEATURES.$$arch = $$qtConfEvaluate('tests.architecture.subarch')"
|
|
|
|
publicPro = \
|
|
|
|
"QT_ARCH = $$arch"
|
|
|
|
}
|
|
|
|
|
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
|
|
|
$${currentConfig}.output.publicPro += $$publicPro
|
|
|
|
export($${currentConfig}.output.publicPro)
|
|
|
|
$${currentConfig}.output.privatePro += $$privatePro
|
|
|
|
export($${currentConfig}.output.privatePro)
|
2016-06-29 09:39:27 +00:00
|
|
|
|
|
|
|
# setup QT_ARCH variable used by qtConfEvaluate
|
|
|
|
QT_ARCH = $$arch
|
|
|
|
export(QT_ARCH)
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtConfOutput_qreal) {
|
|
|
|
qreal = $$config.input.qreal
|
|
|
|
isEmpty(qreal): qreal = "double"
|
|
|
|
qreal_string = $$replace(qreal, [^a-zA-Z0-9], "_")
|
|
|
|
qtConfOutputVar(assign, "privatePro", "QT_COORD_TYPE", $$qreal)
|
|
|
|
!equals(qreal, "double") {
|
|
|
|
qtConfOutputSetDefine("publicHeader", "QT_COORD_TYPE", $$qreal)
|
|
|
|
qtConfOutputSetDefine("publicHeader", "QT_COORD_TYPE_STRING", "\"$$qreal_string\"")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_pkgConfig) {
|
|
|
|
!$${2}: return()
|
|
|
|
|
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
|
|
|
PKG_CONFIG = $$eval($${currentConfig}.tests.pkg-config.pkgConfig)
|
2016-08-26 17:22:17 +00:00
|
|
|
export(PKG_CONFIG)
|
2016-06-11 20:49:01 +00:00
|
|
|
# this method also exports PKG_CONFIG_(LIB|SYSROOT)DIR, so that tests using pkgConfig will work correctly
|
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
|
|
|
PKG_CONFIG_SYSROOT_DIR = $$eval($${currentConfig}.tests.pkg-config.pkgConfigSysrootDir)
|
2016-06-11 20:49:01 +00:00
|
|
|
!isEmpty(PKG_CONFIG_SYSROOT_DIR) {
|
|
|
|
qtConfOutputVar(assign, "publicPro", "PKG_CONFIG_SYSROOT_DIR", $$PKG_CONFIG_SYSROOT_DIR)
|
|
|
|
export(PKG_CONFIG_SYSROOT_DIR)
|
|
|
|
}
|
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
|
|
|
PKG_CONFIG_LIBDIR = $$eval($${currentConfig}.tests.pkg-config.pkgConfigLibdir)
|
2016-06-11 20:49:01 +00:00
|
|
|
!isEmpty(PKG_CONFIG_LIBDIR) {
|
|
|
|
qtConfOutputVar(assign, "publicPro", "PKG_CONFIG_LIBDIR", $$PKG_CONFIG_LIBDIR)
|
|
|
|
export(PKG_CONFIG_LIBDIR)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_useGoldLinker) {
|
|
|
|
!$${2}: return()
|
|
|
|
|
|
|
|
# We need to preempt the output here, so that qtConfTest_linkerSupportsFlag can work properly in qtbase
|
|
|
|
CONFIG += use_gold_linker
|
|
|
|
export(CONFIG)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_debugAndRelease) {
|
|
|
|
$$qtConfEvaluate("features.debug") {
|
|
|
|
qtConfOutputVar(append, "publicPro", "CONFIG", "debug")
|
|
|
|
$${2}: qtConfOutputVar(append, "publicPro", "QT_CONFIG", "release")
|
|
|
|
qtConfOutputVar(append, "publicPro", "QT_CONFIG", "debug")
|
|
|
|
} else {
|
|
|
|
qtConfOutputVar(append, "publicPro", "CONFIG", "release")
|
|
|
|
$${2}: qtConfOutputVar(append, "publicPro", "QT_CONFIG", "debug")
|
|
|
|
qtConfOutputVar(append, "publicPro", "QT_CONFIG", "release")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_compilerVersion) {
|
|
|
|
!$${2}: return()
|
|
|
|
|
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
|
|
|
name = $$upper($$eval($${currentConfig}.tests.compiler.compilerId))
|
|
|
|
version = $$eval($${currentConfig}.tests.compiler.compilerVersion)
|
2016-06-11 20:49:01 +00:00
|
|
|
major = $$section(version, '.', 0, 0)
|
|
|
|
minor = $$section(version, '.', 1, 1)
|
|
|
|
patch = $$section(version, '.', 2, 2)
|
|
|
|
isEmpty(minor): minor = 0
|
|
|
|
isEmpty(patch): patch = 0
|
|
|
|
|
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
|
|
|
$${currentConfig}.output.publicPro += \
|
2016-06-11 20:49:01 +00:00
|
|
|
"QT_$${name}_MAJOR_VERSION = $$major" \
|
|
|
|
"QT_$${name}_MINOR_VERSION = $$minor" \
|
|
|
|
"QT_$${name}_PATCH_VERSION = $$patch"
|
|
|
|
|
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
|
|
|
export($${currentConfig}.output.publicPro)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# should go away when qfeatures.txt is ported
|
|
|
|
defineTest(qtConfOutput_extraFeatures) {
|
|
|
|
isEmpty(config.input.extra_features): return()
|
|
|
|
|
|
|
|
# write to qconfig.pri
|
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
|
|
|
$${currentConfig}.output.publicPro += "$${LITERAL_HASH}ifndef QT_BOOTSTRAPPED"
|
2016-06-11 20:49:01 +00:00
|
|
|
for (f, config.input.extra_features) {
|
|
|
|
feature = $$replace(f, "^no-", "")
|
|
|
|
FEATURE = $$upper($$replace(feature, -, _))
|
|
|
|
contains(f, "^no-.*") {
|
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
|
|
|
$${currentConfig}.output.publicPro += \
|
2016-06-11 20:49:01 +00:00
|
|
|
"$${LITERAL_HASH}ifndef QT_NO_$$FEATURE" \
|
|
|
|
"$${LITERAL_HASH}define QT_NO_$$FEATURE" \
|
|
|
|
"$${LITERAL_HASH}endif"
|
|
|
|
} else {
|
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
|
|
|
$${currentConfig}.output.publicPro += \
|
2016-06-11 20:49:01 +00:00
|
|
|
"$${LITERAL_HASH}if defined(QT_$$FEATURE) && defined(QT_NO_$$FEATURE)" \
|
|
|
|
"$${LITERAL_HASH}undef QT_$$FEATURE" \
|
|
|
|
"$${LITERAL_HASH}elif !defined(QT_$$FEATURE) && !defined(QT_NO_$$FEATURE)" \
|
|
|
|
"$${LITERAL_HASH}define QT_$$FEATURE" \
|
|
|
|
"$${LITERAL_HASH}endif"
|
|
|
|
}
|
|
|
|
}
|
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
|
|
|
$${currentConfig}.output.publicPro += "$${LITERAL_HASH}endif"
|
|
|
|
export($${currentConfig}.output.publicPro)
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
# write to qmodule.pri
|
|
|
|
disabled_features =
|
|
|
|
for (f, config.input.extra_features) {
|
|
|
|
feature = $$replace(f, "^no-", "")
|
|
|
|
FEATURE = $$upper($$replace(feature, -, _))
|
|
|
|
contains(f, "^no-.*"): disabled_features += $$FEATURE
|
|
|
|
}
|
|
|
|
!isEmpty(disabled_features): qtConfOutputVar(assign, "privatePro", QT_NO_DEFINES, $$disabled_features)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_compilerFlags) {
|
|
|
|
# this output also exports the variables locally, so that subsequent compiler tests can use them
|
|
|
|
|
|
|
|
output =
|
|
|
|
!isEmpty(config.input.wflags) {
|
|
|
|
wflags = $$join(config.input.wflags, " -W", "-W")
|
|
|
|
QMAKE_CFLAGS_WARN_ON += $$wflags
|
|
|
|
QMAKE_CXXFLAGS_WARN_ON += $$wflags
|
|
|
|
export(QMAKE_CFLAGS_WARN_ON)
|
|
|
|
export(QMAKE_CXXFLAGS_WARN_ON)
|
|
|
|
output += \
|
|
|
|
"QMAKE_CFLAGS_WARN_ON += $$wflags" \
|
|
|
|
"QMAKE_CXXFLAGS_WARN_ON += $$wflags"
|
|
|
|
}
|
|
|
|
!isEmpty(config.input.defines) {
|
|
|
|
EXTRA_DEFINES += $$config.input.defines
|
|
|
|
export(EXTRA_DEFINES)
|
2016-07-14 19:13:11 +00:00
|
|
|
output += "EXTRA_DEFINES += $$val_escape(config.input.defines)"
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
!isEmpty(config.input.includes) {
|
|
|
|
EXTRA_INCLUDEPATH += $$config.input.includes
|
|
|
|
export(EXTRA_INCLUDEPATH)
|
2016-07-14 19:13:11 +00:00
|
|
|
output += "EXTRA_INCLUDEPATH += $$val_escape(config.input.includes)"
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
2016-07-07 11:47:49 +00:00
|
|
|
!isEmpty(config.input.lpaths) {
|
|
|
|
EXTRA_LIBDIR += $$config.input.lpaths
|
|
|
|
export(EXTRA_LIBDIR)
|
2016-07-14 19:13:11 +00:00
|
|
|
output += "EXTRA_LIBDIR += $$val_escape(config.input.lpaths)"
|
2016-07-07 11:47:49 +00:00
|
|
|
}
|
|
|
|
darwin:!isEmpty(config.input.fpaths) {
|
|
|
|
EXTRA_FRAMEWORKPATH += $$config.input.fpaths
|
|
|
|
export(EXTRA_FRAMEWORKPATH)
|
2016-07-14 19:13:11 +00:00
|
|
|
output += "EXTRA_FRAMEWORKPATH += $$val_escape(config.input.fpaths)"
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
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
|
|
|
$${currentConfig}.output.privatePro += $$output
|
|
|
|
export($${currentConfig}.output.privatePro)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_gccSysroot) {
|
|
|
|
!$${2}: return()
|
|
|
|
|
|
|
|
# This variable also needs to be exported immediately, so the compilation tests
|
|
|
|
# can pick it up.
|
replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without
modifying (or wrapping) the spec itself. linux distributors do this on a
regular basis.
so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat
autoconf-like fashion. however, over time, this approach proved
problematic: the concept doesn't mix particularly well with mkspecs to
start with, is unexpected (and therefore causes frustration), and
doesn't mix well with cross-building (at least the way it was realized).
ironically, it was implemented this way (quite a while ago) upon my
explicit request ...
the new mechanism uses explicit variable manipulations on the configure
command line, just like qmake itself understands. as it happens, this is
again quite similar to autoconf-generated configure scripts. however,
this time around we don't pretend to be actually autoconf-like, so we
also don't try to map any variable names (some of which have different
semantics anyway).
this commit also eliminates the last use of the QMakeVar() function,
so delete it and the underlying infrastructure.
Task-number: QTBUG-32530
Task-number: QTBUG-42962
Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-06 11:58:53 +00:00
|
|
|
EXTRA_QMAKE_ARGS += \
|
2016-06-11 20:49:01 +00:00
|
|
|
"\"QMAKE_CFLAGS += --sysroot=$$config.input.sysroot\"" \
|
|
|
|
"\"QMAKE_CXXFLAGS += --sysroot=$$config.input.sysroot\"" \
|
|
|
|
"\"QMAKE_LFLAGS += --sysroot=$$config.input.sysroot\""
|
|
|
|
export(EXTRA_QMAKE_ARGS)
|
|
|
|
|
|
|
|
output = \
|
|
|
|
"!host_build {" \
|
|
|
|
" QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" \
|
|
|
|
" QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" \
|
|
|
|
" QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" \
|
|
|
|
"}"
|
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
|
|
|
$${currentConfig}.output.publicPro += $$output
|
|
|
|
export($${currentConfig}.output.publicPro)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without
modifying (or wrapping) the spec itself. linux distributors do this on a
regular basis.
so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat
autoconf-like fashion. however, over time, this approach proved
problematic: the concept doesn't mix particularly well with mkspecs to
start with, is unexpected (and therefore causes frustration), and
doesn't mix well with cross-building (at least the way it was realized).
ironically, it was implemented this way (quite a while ago) upon my
explicit request ...
the new mechanism uses explicit variable manipulations on the configure
command line, just like qmake itself understands. as it happens, this is
again quite similar to autoconf-generated configure scripts. however,
this time around we don't pretend to be actually autoconf-like, so we
also don't try to map any variable names (some of which have different
semantics anyway).
this commit also eliminates the last use of the QMakeVar() function,
so delete it and the underlying infrastructure.
Task-number: QTBUG-32530
Task-number: QTBUG-42962
Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-06 11:58:53 +00:00
|
|
|
defineTest(qtConfOutput_qmakeArgs) {
|
|
|
|
!$${2}: return()
|
|
|
|
|
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
|
|
|
$${currentConfig}.output.privatePro = "!host_build {"
|
replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without
modifying (or wrapping) the spec itself. linux distributors do this on a
regular basis.
so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat
autoconf-like fashion. however, over time, this approach proved
problematic: the concept doesn't mix particularly well with mkspecs to
start with, is unexpected (and therefore causes frustration), and
doesn't mix well with cross-building (at least the way it was realized).
ironically, it was implemented this way (quite a while ago) upon my
explicit request ...
the new mechanism uses explicit variable manipulations on the configure
command line, just like qmake itself understands. as it happens, this is
again quite similar to autoconf-generated configure scripts. however,
this time around we don't pretend to be actually autoconf-like, so we
also don't try to map any variable names (some of which have different
semantics anyway).
this commit also eliminates the last use of the QMakeVar() function,
so delete it and the underlying infrastructure.
Task-number: QTBUG-32530
Task-number: QTBUG-42962
Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-06 11:58:53 +00:00
|
|
|
for (a, config.input.qmakeArgs) {
|
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
|
|
|
$${currentConfig}.output.privatePro += " $$a"
|
replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without
modifying (or wrapping) the spec itself. linux distributors do this on a
regular basis.
so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat
autoconf-like fashion. however, over time, this approach proved
problematic: the concept doesn't mix particularly well with mkspecs to
start with, is unexpected (and therefore causes frustration), and
doesn't mix well with cross-building (at least the way it was realized).
ironically, it was implemented this way (quite a while ago) upon my
explicit request ...
the new mechanism uses explicit variable manipulations on the configure
command line, just like qmake itself understands. as it happens, this is
again quite similar to autoconf-generated configure scripts. however,
this time around we don't pretend to be actually autoconf-like, so we
also don't try to map any variable names (some of which have different
semantics anyway).
this commit also eliminates the last use of the QMakeVar() function,
so delete it and the underlying infrastructure.
Task-number: QTBUG-32530
Task-number: QTBUG-42962
Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-06 11:58:53 +00:00
|
|
|
EXTRA_QMAKE_ARGS += $$system_quote($$a)
|
|
|
|
}
|
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
|
|
|
$${currentConfig}.output.privatePro += "}"
|
replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without
modifying (or wrapping) the spec itself. linux distributors do this on a
regular basis.
so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat
autoconf-like fashion. however, over time, this approach proved
problematic: the concept doesn't mix particularly well with mkspecs to
start with, is unexpected (and therefore causes frustration), and
doesn't mix well with cross-building (at least the way it was realized).
ironically, it was implemented this way (quite a while ago) upon my
explicit request ...
the new mechanism uses explicit variable manipulations on the configure
command line, just like qmake itself understands. as it happens, this is
again quite similar to autoconf-generated configure scripts. however,
this time around we don't pretend to be actually autoconf-like, so we
also don't try to map any variable names (some of which have different
semantics anyway).
this commit also eliminates the last use of the QMakeVar() function,
so delete it and the underlying infrastructure.
Task-number: QTBUG-32530
Task-number: QTBUG-42962
Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-06 11:58:53 +00:00
|
|
|
export(EXTRA_QMAKE_ARGS)
|
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
|
|
|
export($${currentConfig}.output.privatePro)
|
replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without
modifying (or wrapping) the spec itself. linux distributors do this on a
regular basis.
so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat
autoconf-like fashion. however, over time, this approach proved
problematic: the concept doesn't mix particularly well with mkspecs to
start with, is unexpected (and therefore causes frustration), and
doesn't mix well with cross-building (at least the way it was realized).
ironically, it was implemented this way (quite a while ago) upon my
explicit request ...
the new mechanism uses explicit variable manipulations on the configure
command line, just like qmake itself understands. as it happens, this is
again quite similar to autoconf-generated configure scripts. however,
this time around we don't pretend to be actually autoconf-like, so we
also don't try to map any variable names (some of which have different
semantics anyway).
this commit also eliminates the last use of the QMakeVar() function,
so delete it and the underlying infrastructure.
Task-number: QTBUG-32530
Task-number: QTBUG-42962
Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-06 11:58:53 +00:00
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtConfOutputPostProcess_publicPro) {
|
|
|
|
qt_version = $$[QT_VERSION]
|
|
|
|
output = \
|
|
|
|
"QT_VERSION = $$qt_version" \
|
|
|
|
"QT_MAJOR_VERSION = $$section(qt_version, '.', 0, 0)" \
|
|
|
|
"QT_MINOR_VERSION = $$section(qt_version, '.', 1, 1)" \
|
2016-06-29 09:39:27 +00:00
|
|
|
"QT_PATCH_VERSION = $$section(qt_version, '.', 2, 2)"
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
#libinfix and namespace
|
|
|
|
!isEmpty(config.input.qt_libinfix): output += "QT_LIBINFIX = $$config.input.qt_libinfix"
|
|
|
|
!isEmpty(config.input.qt_namespace): output += "QT_NAMESPACE = $$config.input.qt_namespace"
|
|
|
|
|
|
|
|
output += "QT_EDITION = $$config.input.qt_edition"
|
|
|
|
!contains(config.input.qt_edition, "(OpenSource|Preview)") {
|
|
|
|
output += \
|
|
|
|
"QT_LICHECK = $$config.input.qt_licheck" \
|
|
|
|
"QT_RELEASE_DATE = $$config.input.qt_release_date"
|
|
|
|
}
|
|
|
|
|
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
|
|
|
$${currentConfig}.output.publicPro += $$output
|
|
|
|
export($${currentConfig}.output.publicPro)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutputPostProcess_publicHeader) {
|
|
|
|
qt_version = $$[QT_VERSION]
|
|
|
|
output = \
|
|
|
|
"$${LITERAL_HASH}define QT_VERSION_STR \"$$qt_version\"" \
|
|
|
|
"$${LITERAL_HASH}define QT_VERSION_MAJOR $$section(qt_version, '.', 0, 0)" \
|
|
|
|
"$${LITERAL_HASH}define QT_VERSION_MINOR $$section(qt_version, '.', 1, 1)" \
|
|
|
|
"$${LITERAL_HASH}define QT_VERSION_PATCH $$section(qt_version, '.', 2, 2)"
|
|
|
|
|
|
|
|
!$$qtConfEvaluate("features.shared") {
|
|
|
|
output += \
|
|
|
|
"/* Qt was configured for a static build */" \
|
|
|
|
"$${LITERAL_HASH}if !defined(QT_SHARED) && !defined(QT_STATIC)" \
|
|
|
|
"$${LITERAL_HASH} define QT_STATIC" \
|
|
|
|
"$${LITERAL_HASH}endif"
|
|
|
|
}
|
|
|
|
|
|
|
|
!isEmpty(config.input.qt_libinfix): \
|
|
|
|
output += "$${LITERAL_HASH}define QT_LIBINFIX \"$$eval(config.input.qt_libinfix)\""
|
|
|
|
|
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
|
|
|
$${currentConfig}.output.publicHeader += $$output
|
|
|
|
export($${currentConfig}.output.publicHeader)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# custom reporting
|
|
|
|
|
|
|
|
defineTest(qtConfReport_buildParts) {
|
2016-06-22 07:52:41 +00:00
|
|
|
qtConfReportPadded($${1}, $$qtConfEvaluate("tests.build_parts.value"))
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfReport_buildTypeAndConfig) {
|
2016-06-29 09:39:27 +00:00
|
|
|
!$$qtConfEvaluate("features.cross_compile") {
|
|
|
|
qtConfAddReport("Build type: $$qtConfEvaluate('tests.architecture.arch')")
|
2016-06-11 20:49:01 +00:00
|
|
|
} else {
|
2016-06-29 09:39:27 +00:00
|
|
|
qtConfAddReport("Building on: $$qtConfEvaluate('tests.host_architecture.arch')")
|
|
|
|
qtConfAddReport("Building for: $$qtConfEvaluate('tests.architecture.arch')")
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
qtConfAddReport()
|
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
|
|
|
qtConfAddReport("Configuration: $$eval($${currentConfig}.output.privatePro.append.CONFIG) $$eval($${currentConfig}.output.publicPro.append.QT_CONFIG)")
|
2016-06-11 20:49:01 +00:00
|
|
|
qtConfAddReport()
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfReport_buildMode) {
|
|
|
|
$$qtConfEvaluate("features.force_debug_info"): \
|
|
|
|
release = "release (with debug info)"
|
|
|
|
else: \
|
|
|
|
release = "release"
|
|
|
|
|
|
|
|
$$qtConfEvaluate("features.debug"): \
|
|
|
|
build_mode = "debug"
|
|
|
|
else: \
|
|
|
|
build_mode = $$release
|
|
|
|
|
|
|
|
$$qtConfEvaluate("features.debug_and_release"): \
|
|
|
|
build_mode = "debug and $$release; default link: $$build_mode"
|
|
|
|
|
|
|
|
$$qtConfEvaluate("features.release_tools"): \
|
|
|
|
build_mode = "$$build_mode; optimized tools"
|
|
|
|
|
|
|
|
qtConfReportPadded($$1, $$build_mode)
|
|
|
|
}
|
|
|
|
|
2016-08-23 12:22:19 +00:00
|
|
|
# ensure pristine environment for configuration
|
|
|
|
discard_from($$[QT_HOST_DATA/get]/mkspecs/qconfig.pri)
|
|
|
|
discard_from($$[QT_HOST_DATA/get]/mkspecs/qmodule.pri)
|
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
|
|
|
# ... and cause them to be reloaded afterwards
|
|
|
|
QMAKE_POST_CONFIGURE += \
|
|
|
|
"include(\$\$[QT_HOST_DATA/get]/mkspecs/qconfig.pri)" \
|
|
|
|
"include(\$\$[QT_HOST_DATA/get]/mkspecs/qmodule.pri)"
|
2016-08-23 12:22:19 +00:00
|
|
|
|
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
|
|
|
# load and process input from configure.sh/.exe
|
|
|
|
include($$shadowed($$PWD)/config.tests/configure.cfg)
|