2018-12-14 15:11:01 +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.
|
|
|
|
#
|
2016-08-16 18:03:54 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
QT_CONFIGURE_REPORT =
|
|
|
|
QT_CONFIGURE_NOTES =
|
|
|
|
QT_CONFIGURE_WARNINGS =
|
|
|
|
QT_CONFIGURE_ERRORS =
|
|
|
|
|
|
|
|
defineTest(qtConfAddReport) {
|
|
|
|
QT_CONFIGURE_REPORT += "$$join(1, $$escape_expand(\\n))"
|
|
|
|
export(QT_CONFIGURE_REPORT)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfAddNote) {
|
|
|
|
QT_CONFIGURE_NOTES += "Note: $$join(1, $$escape_expand(\\n))"
|
|
|
|
export(QT_CONFIGURE_NOTES)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfAddWarning) {
|
|
|
|
QT_CONFIGURE_WARNINGS += "WARNING: $$join(1, $$escape_expand(\\n))"
|
|
|
|
export(QT_CONFIGURE_WARNINGS)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfAddError) {
|
|
|
|
QT_CONFIGURE_ERRORS += "ERROR: $$join(1, $$escape_expand(\\n))"
|
|
|
|
export(QT_CONFIGURE_ERRORS)
|
2016-11-16 14:15:51 +00:00
|
|
|
equals(2, log):qt_conf_tests_allowed {
|
2016-07-14 14:41:09 +00:00
|
|
|
CONFIG += mention_config_log
|
|
|
|
export(CONFIG)
|
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
2016-11-18 17:17:49 +00:00
|
|
|
defineTest(qtConfFatalError) {
|
|
|
|
qtConfAddError($$1, $$2)
|
|
|
|
qtConfPrintReport()
|
|
|
|
error()
|
|
|
|
}
|
|
|
|
|
2017-07-28 15:42:27 +00:00
|
|
|
# Return a string list for the specified JSON path, which may be either a
|
|
|
|
# single string or an array of strings.
|
|
|
|
# Note that this returns a variable name, so it can be directly iterated over.
|
|
|
|
defineReplace(qtConfScalarOrList) {
|
|
|
|
defined($$1, var): return($$1)
|
|
|
|
vals = $$list()
|
|
|
|
for (i, $${1}._KEYS_): \
|
|
|
|
$$vals += $$eval($${1}.$$i)
|
|
|
|
export($$vals)
|
|
|
|
return($$vals)
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtConfCommandlineSetInput) {
|
|
|
|
arg = $${1}
|
|
|
|
val = $${2}
|
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
|
|
|
!isEmpty($${currentConfig}.commandline.options.$${arg}.name): \
|
|
|
|
arg = $$eval($${currentConfig}.commandline.options.$${arg}.name)
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
config.input.$$arg = $$val
|
|
|
|
export(config.input.$$arg)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(qtConfGetNextCommandlineArg) {
|
|
|
|
c = $$take_first(QMAKE_EXTRA_ARGS)
|
|
|
|
export(QMAKE_EXTRA_ARGS)
|
|
|
|
return($$c)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(qtConfPeekNextCommandlineArg) {
|
|
|
|
return($$first(QMAKE_EXTRA_ARGS))
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfCommandline_boolean) {
|
|
|
|
opt = $${1}
|
|
|
|
val = $${2}
|
|
|
|
isEmpty(val): val = yes
|
|
|
|
|
|
|
|
!equals(val, yes):!equals(val, no) {
|
|
|
|
qtConfAddError("Invalid value given for boolean command line option '$$opt'.")
|
|
|
|
return()
|
|
|
|
}
|
|
|
|
|
|
|
|
qtConfCommandlineSetInput($$opt, $$val)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfCommandline_void) {
|
|
|
|
opt = $${1}
|
|
|
|
val = $${2}
|
|
|
|
!isEmpty(val) {
|
2016-07-14 14:30:19 +00:00
|
|
|
qtConfAddError("Command line option '$$opt' expects no argument ('$$val' given).")
|
2016-06-11 20:49:01 +00:00
|
|
|
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
|
|
|
val = $$eval($${currentConfig}.commandline.options.$${opt}.value)
|
2016-06-11 20:49:01 +00:00
|
|
|
isEmpty(val): val = yes
|
|
|
|
|
|
|
|
qtConfCommandlineSetInput($$opt, $$val)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfCommandline_enum) {
|
|
|
|
opt = $${1}
|
|
|
|
val = $${2}
|
|
|
|
isEmpty(val): val = yes
|
|
|
|
|
|
|
|
# validate and map value
|
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
|
|
|
mapped = $$eval($${currentConfig}.commandline.options.$${opt}.values.$${val})
|
2016-06-11 20:49:01 +00:00
|
|
|
isEmpty(mapped) {
|
|
|
|
# just a list of allowed values
|
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
|
|
|
for (i, $${currentConfig}.commandline.options.$${opt}.values._KEYS_) {
|
|
|
|
equals($${currentConfig}.commandline.options.$${opt}.values.$${i}, $$val) {
|
2016-06-11 20:49:01 +00:00
|
|
|
mapped = $$val
|
|
|
|
break()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
isEmpty(mapped) {
|
|
|
|
qtConfAddError("Invalid value '$$val' supplied to command line option '$$opt'.")
|
|
|
|
return()
|
|
|
|
}
|
|
|
|
|
|
|
|
qtConfCommandlineSetInput($$opt, $$mapped)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfValidateValue) {
|
|
|
|
opt = $${1}
|
|
|
|
val = $${2}
|
|
|
|
|
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
|
|
|
validValues = $$eval($${currentConfig}.commandline.options.$${opt}.values._KEYS_)
|
2016-06-11 20:49:01 +00:00
|
|
|
isEmpty(validValues): \
|
|
|
|
return(true)
|
|
|
|
|
|
|
|
for (i, validValues) {
|
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
|
|
|
equals($${currentConfig}.commandline.options.$${opt}.values.$${i}, $$val): \
|
2016-06-11 20:49:01 +00:00
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
2016-07-14 14:30:19 +00:00
|
|
|
qtConfAddError("Invalid value '$$val' supplied to command line option '$$opt'.")
|
2016-06-11 20:49:01 +00:00
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfCommandline_string) {
|
|
|
|
opt = $${1}
|
|
|
|
val = $${2}
|
2017-02-21 16:39:43 +00:00
|
|
|
nextok = $${3}
|
|
|
|
isEmpty(val):$$nextok: val = $$qtConfGetNextCommandlineArg()
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-08-10 10:34:24 +00:00
|
|
|
# Note: Arguments which are variable assignments are legit here.
|
2016-06-11 20:49:01 +00:00
|
|
|
contains(val, "^-.*")|isEmpty(val) {
|
2016-07-14 14:30:19 +00:00
|
|
|
qtConfAddError("No value supplied to command line option '$$opt'.")
|
2016-06-11 20:49:01 +00:00
|
|
|
return()
|
|
|
|
}
|
|
|
|
|
|
|
|
!qtConfValidateValue($$opt, $$val): \
|
|
|
|
return()
|
|
|
|
|
|
|
|
qtConfCommandlineSetInput($$opt, $$val)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfCommandline_optionalString) {
|
|
|
|
opt = $${1}
|
|
|
|
val = $${2}
|
2017-02-21 16:39:43 +00:00
|
|
|
nextok = $${3}
|
2016-06-11 20:49:01 +00:00
|
|
|
isEmpty(val) {
|
2017-02-21 16:39:43 +00:00
|
|
|
$$nextok: val = $$qtConfPeekNextCommandlineArg()
|
2018-06-25 13:58:42 +00:00
|
|
|
contains(val, "^-.*|[A-Z0-9_]+=.*")|isEmpty(val): \
|
2016-06-11 20:49:01 +00:00
|
|
|
val = "yes"
|
|
|
|
else: \
|
|
|
|
val = $$qtConfGetNextCommandlineArg()
|
|
|
|
}
|
|
|
|
|
|
|
|
!qtConfValidateValue($$opt, $$val): \
|
|
|
|
return()
|
|
|
|
|
|
|
|
qtConfCommandlineSetInput($$opt, $$val)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
defineTest(qtConfCommandline_addString) {
|
|
|
|
opt = $${1}
|
|
|
|
val = $${2}
|
2017-02-21 16:39:43 +00:00
|
|
|
nextok = $${3}
|
|
|
|
isEmpty(val):$$nextok: val = $$qtConfGetNextCommandlineArg()
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-11-24 17:41:57 +00:00
|
|
|
# Note: Arguments which are variable assignments are legit here.
|
|
|
|
contains(val, "^-.*")|isEmpty(val) {
|
2016-07-14 14:30:19 +00:00
|
|
|
qtConfAddError("No value supplied to command line option '$$opt'.")
|
2016-06-11 20:49:01 +00:00
|
|
|
return()
|
|
|
|
}
|
|
|
|
|
|
|
|
!qtConfValidateValue($$opt, $$val): \
|
|
|
|
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
|
|
|
!isEmpty($${currentConfig}.commandline.options.$${opt}.name): \
|
|
|
|
opt = $$eval($${currentConfig}.commandline.options.$${opt}.name)
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
config.input.$$opt += $$val
|
|
|
|
export(config.input.$$opt)
|
|
|
|
}
|
|
|
|
|
2016-11-15 19:49:43 +00:00
|
|
|
defineTest(qtConfCommandline_redo) {
|
|
|
|
!exists($$OUT_PWD/config.opt) {
|
|
|
|
qtConfAddError("No config.opt present - cannot redo configuration.")
|
|
|
|
return()
|
|
|
|
}
|
2017-01-09 14:38:24 +00:00
|
|
|
QMAKE_EXTRA_REDO_ARGS = $$cat($$OUT_PWD/config.opt, lines)
|
|
|
|
export(QMAKE_EXTRA_REDO_ARGS) # just for config.log
|
|
|
|
QMAKE_EXTRA_ARGS = $$QMAKE_EXTRA_REDO_ARGS $$QMAKE_EXTRA_ARGS
|
2016-11-15 19:49:43 +00:00
|
|
|
export(QMAKE_EXTRA_ARGS)
|
|
|
|
QMAKE_REDO_CONFIG = true
|
|
|
|
export(QMAKE_REDO_CONFIG)
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtConfParseCommandLine) {
|
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
|
|
|
customCalls =
|
|
|
|
for (cc, allConfigs) {
|
|
|
|
custom = $$eval($${cc}.commandline.custom)
|
|
|
|
|
|
|
|
!isEmpty(custom) {
|
|
|
|
customCall = qtConfCommandline_$$custom
|
|
|
|
!defined($$customCall, test): \
|
|
|
|
error("Custom command line callback '$$custom' is undefined.")
|
|
|
|
customCalls += $$customCall
|
|
|
|
}
|
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
|
|
|
for (ever) {
|
|
|
|
c = $$qtConfGetNextCommandlineArg()
|
|
|
|
isEmpty(c): break()
|
|
|
|
|
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
|
|
|
didCustomCall = false
|
|
|
|
for (customCall, customCalls) {
|
|
|
|
$${customCall}($$c) {
|
|
|
|
didCustomCall = true
|
|
|
|
break()
|
|
|
|
}
|
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
|
|
|
}
|
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
|
|
|
$$didCustomCall: \
|
|
|
|
next()
|
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
|
|
|
|
2018-06-25 13:58:42 +00:00
|
|
|
contains(c, "([A-Z0-9_]+)=(.*)") {
|
|
|
|
opt = $$replace(c, "^([A-Z0-9_]+)=(.*)", "\\1")
|
|
|
|
val = $$replace(c, "^([A-Z0-9_]+)=(.*)", "\\2")
|
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
|
|
|
for (cc, allConfigs) {
|
|
|
|
var = $$eval($${cc}.commandline.assignments.$${opt})
|
|
|
|
!isEmpty(var): \
|
|
|
|
break()
|
|
|
|
}
|
2016-08-10 10:34:24 +00:00
|
|
|
isEmpty(var) {
|
|
|
|
qtConfAddError("Assigning unknown variable '$$opt' on command line.")
|
|
|
|
return()
|
|
|
|
}
|
|
|
|
config.input.$$var = $$val
|
|
|
|
export(config.input.$$var)
|
|
|
|
next()
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# parse out opt and val
|
2017-02-21 16:39:43 +00:00
|
|
|
nextok = false
|
2016-06-11 20:49:01 +00:00
|
|
|
contains(c, "^--?enable-(.*)") {
|
|
|
|
opt = $$replace(c, "^--?enable-(.*)", "\\1")
|
|
|
|
val = yes
|
|
|
|
} else: contains(c, "^--?(disable|no)-(.*)") {
|
|
|
|
opt = $$replace(c, "^--?(disable|no)-(.*)", "\\2")
|
|
|
|
val = no
|
2016-08-30 16:10:41 +00:00
|
|
|
} else: contains(c, "^--([^=]+)=(.*)") {
|
2017-01-05 13:28:41 +00:00
|
|
|
opt = $$replace(c, "^--([^=]+)=(.*)", "\\1")
|
|
|
|
val = $$replace(c, "^--([^=]+)=(.*)", "\\2")
|
2016-08-30 16:10:41 +00:00
|
|
|
} else: contains(c, "^--(.*)") {
|
|
|
|
opt = $$replace(c, "^--(.*)", "\\1")
|
2017-02-21 16:39:43 +00:00
|
|
|
val =
|
2016-08-30 16:10:41 +00:00
|
|
|
} else: contains(c, "^-(.*)") {
|
|
|
|
opt = $$replace(c, "^-(.*)", "\\1")
|
2016-06-11 20:49:01 +00:00
|
|
|
val =
|
2017-02-21 16:39:43 +00:00
|
|
|
nextok = true
|
2016-08-30 16:25:37 +00:00
|
|
|
for (cc, allConfigs) {
|
|
|
|
type = $$eval($${cc}.commandline.options.$${opt})
|
|
|
|
!isEmpty(type): break()
|
|
|
|
type = $$eval($${cc}.commandline.options.$${opt}.type)
|
|
|
|
!isEmpty(type): break()
|
|
|
|
}
|
|
|
|
isEmpty(type):contains(opt, "(qt|system)-.*") {
|
|
|
|
val = $$replace(opt, "(qt|system)-(.*)", "\\1")
|
|
|
|
opt = $$replace(opt, "(qt|system)-(.*)", "\\2")
|
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
} else {
|
2016-07-14 14:40:23 +00:00
|
|
|
qtConfAddError("Invalid command line parameter '$$c'.")
|
|
|
|
return()
|
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
|
|
|
for (cc, allConfigs) {
|
|
|
|
type = $$eval($${cc}.commandline.options.$${opt})
|
|
|
|
isEmpty(type): \
|
|
|
|
type = $$eval($${cc}.commandline.options.$${opt}.type)
|
|
|
|
isEmpty(type) {
|
|
|
|
# no match in the regular options, try matching the prefixes
|
|
|
|
for (p, $${cc}.commandline.prefix._KEYS_) {
|
|
|
|
e = "^-$${p}(.*)"
|
|
|
|
contains(c, $$e) {
|
|
|
|
opt = $$eval($${cc}.commandline.prefix.$${p})
|
|
|
|
val = $$replace(c, $$e, "\\1")
|
2017-02-21 16:39:43 +00:00
|
|
|
nextok = true
|
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
|
|
|
type = "addString"
|
|
|
|
break()
|
|
|
|
}
|
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
|
|
|
!isEmpty(type) {
|
|
|
|
currentConfig = $$cc
|
|
|
|
break()
|
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
# handle builtin [-no]-feature-xxx
|
|
|
|
isEmpty(type):contains(opt, "feature-(.*)") {
|
2016-08-26 19:19:12 +00:00
|
|
|
opt ~= s,^feature-,,
|
|
|
|
found = false
|
|
|
|
for (cc, allConfigs) {
|
|
|
|
contains($${cc}.features._KEYS_, $$opt) {
|
|
|
|
found = true
|
|
|
|
break()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
!$$found {
|
|
|
|
qtConfAddError("Enabling/Disabling unknown feature '$$opt'.")
|
|
|
|
return()
|
|
|
|
}
|
|
|
|
# this is a boolean enabling/disabling the corresponding feature
|
|
|
|
type = boolean
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
2019-01-23 12:03:44 +00:00
|
|
|
isEmpty(type):contains(opt, "skip") {
|
|
|
|
isEmpty(skipOptionWarningAdded) {
|
|
|
|
qtConfAddWarning("Command line option -skip is only effective in top-level builds.")
|
|
|
|
skipOptionWarningAdded = 1
|
|
|
|
}
|
|
|
|
$$qtConfGetNextCommandlineArg()
|
|
|
|
next()
|
|
|
|
}
|
|
|
|
|
2016-07-14 14:40:23 +00:00
|
|
|
isEmpty(type) {
|
|
|
|
qtConfAddError("Unknown command line option '$$c'.")
|
2019-01-24 14:06:19 +00:00
|
|
|
equals(config.input.continue, yes): \
|
|
|
|
next()
|
|
|
|
else: \
|
|
|
|
return()
|
2016-07-14 14:40:23 +00:00
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
call = "qtConfCommandline_$${type}"
|
|
|
|
!defined($$call, test): \
|
|
|
|
error("Command line option '$$c' has unknown type '$$type'.")
|
|
|
|
|
|
|
|
# now that we have opt and value, process it
|
2017-02-21 16:39:43 +00:00
|
|
|
$${call}($$opt, $$val, $$nextok)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(qtConfToolchainSupportsFlag) {
|
2017-05-15 12:14:28 +00:00
|
|
|
test_out_dir = $$OUT_PWD/$$basename(QMAKE_CONFIG_TESTS_DIR)
|
2016-11-11 09:02:34 +00:00
|
|
|
test_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$test_out_dir)) &&"
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
conftest = "int main() { return 0; }"
|
2016-07-14 14:50:02 +00:00
|
|
|
write_file("$$test_out_dir/conftest.cpp", conftest)|error()
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2018-06-25 19:08:57 +00:00
|
|
|
qtRunLoggedCommand("$$test_cmd_base $$QMAKE_CXX $$QMAKE_CXXFLAGS $${1} -o conftest-out conftest.cpp"): \
|
2016-06-11 20:49:01 +00:00
|
|
|
return(true)
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfTest_compilerSupportsFlag) {
|
|
|
|
flag = $$eval($${1}.flag)
|
|
|
|
|
|
|
|
return($$qtConfToolchainSupportsFlag($$flag))
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfTest_linkerSupportsFlag) {
|
|
|
|
flag = $$eval($${1}.flag)
|
|
|
|
|
|
|
|
use_gold_linker: \
|
|
|
|
LFLAGS = -fuse-ld=gold
|
|
|
|
|
2016-07-01 08:35:07 +00:00
|
|
|
return($$qtConfToolchainSupportsFlag($$LFLAGS "-Wl,$$flag"))
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
2016-08-05 15:54:26 +00:00
|
|
|
defineReplace(qtConfFindInPathList) {
|
2017-12-01 19:13:08 +00:00
|
|
|
# This nesting is consistent with Apple ld -search_paths_first,
|
|
|
|
# and presumably with GNU ld (no actual documentation found).
|
2016-08-05 15:54:26 +00:00
|
|
|
for (dir, 2) {
|
2017-12-01 19:13:08 +00:00
|
|
|
for (file, 1) {
|
|
|
|
exists("$$dir/$$file"): \
|
|
|
|
return("$$dir/$$file")
|
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
return()
|
|
|
|
}
|
|
|
|
|
2016-08-05 15:54:26 +00:00
|
|
|
defineReplace(qtConfFindInPath) {
|
|
|
|
ensurePathEnv()
|
2018-11-27 12:53:44 +00:00
|
|
|
equals(QMAKE_HOST.os, Windows):!contains(1, .*\\.exe): 1 = $${1}.exe
|
2016-08-14 07:48:55 +00:00
|
|
|
return($$qtConfFindInPathList($$1, $$2 $$QMAKE_PATH_ENV))
|
2016-08-05 15:54:26 +00:00
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineReplace(qtConfPkgConfigEnv) {
|
|
|
|
env =
|
2016-06-28 14:22:34 +00:00
|
|
|
!isEmpty(PKG_CONFIG_SYSROOT_DIR): env = "$${SETENV_PFX}PKG_CONFIG_SYSROOT_DIR=$${PKG_CONFIG_SYSROOT_DIR}$${SETENV_SFX} "
|
|
|
|
!isEmpty(PKG_CONFIG_LIBDIR): env = "$$env$${SETENV_PFX}PKG_CONFIG_LIBDIR=$${PKG_CONFIG_LIBDIR}$${SETENV_SFX} "
|
2016-06-11 20:49:01 +00:00
|
|
|
return($$env)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(qtConfPkgConfig) {
|
|
|
|
host = $$1
|
|
|
|
isEmpty(host): host = false
|
|
|
|
|
|
|
|
$$host {
|
|
|
|
pkg_config = $$qtConfFindInPath("pkg-config")
|
|
|
|
} else {
|
2016-10-26 11:42:24 +00:00
|
|
|
pkg_config = "$$qtConfPkgConfigEnv()$$PKG_CONFIG_EXECUTABLE"
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return($$pkg_config)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfPkgConfigPackageExists) {
|
|
|
|
isEmpty(1)|isEmpty(2): \
|
|
|
|
return(false)
|
|
|
|
|
|
|
|
!qtRunLoggedCommand("$${1} --exists --silence-errors $${2}"): \
|
|
|
|
return(false)
|
|
|
|
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
2017-01-09 14:38:24 +00:00
|
|
|
defineReplace(qtSystemQuote) {
|
2016-06-11 20:49:01 +00:00
|
|
|
args =
|
2017-01-09 14:38:24 +00:00
|
|
|
for (a, 1): \
|
2016-06-11 20:49:01 +00:00
|
|
|
args += $$system_quote($$a)
|
|
|
|
return($$args)
|
|
|
|
}
|
|
|
|
|
2017-01-09 14:38:24 +00:00
|
|
|
defineReplace(qtConfPrepareArgs) {
|
|
|
|
return($$qtSystemQuote($$split(1)))
|
|
|
|
}
|
|
|
|
|
2016-08-15 12:40:52 +00:00
|
|
|
defineTest(qtConfSetupLibraries) {
|
2017-02-08 20:22:08 +00:00
|
|
|
asspfx = $${currentConfig}.commandline.assignments
|
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
|
|
|
for (l, $${currentConfig}.libraries._KEYS_) {
|
|
|
|
lpfx = $${currentConfig}.libraries.$${l}
|
2016-08-15 12:40:52 +00:00
|
|
|
# 'export' may be omitted, in which case it falls back to the library's name
|
|
|
|
!defined($${lpfx}.export, var) {
|
2017-11-24 18:48:33 +00:00
|
|
|
$${lpfx}.export = $$replace(l, -, _)
|
2016-08-15 12:40:52 +00:00
|
|
|
export($${lpfx}.export)
|
|
|
|
}
|
2017-02-01 15:57:49 +00:00
|
|
|
# 'export' may also be empty, but we need a derived identifier
|
|
|
|
alias = $$eval($${lpfx}.export)
|
2017-11-24 18:48:33 +00:00
|
|
|
isEmpty(alias): alias = $$replace(l, -, _)
|
2017-02-01 15:57:49 +00:00
|
|
|
$${lpfx}.alias = $$alias
|
|
|
|
export($${lpfx}.alias)
|
2017-02-08 18:38:31 +00:00
|
|
|
# make it easy to refer to the library by its export name.
|
|
|
|
$${currentConfig}.exports._KEYS_ += $$alias
|
|
|
|
$${currentConfig}.exports.$$alias += $$l
|
|
|
|
export($${currentConfig}.exports.$$alias)
|
2016-08-15 12:40:52 +00:00
|
|
|
isEmpty($${lpfx}.sources._KEYS_): \
|
|
|
|
error("Library $$l defines no sources")
|
|
|
|
for (s, $${lpfx}.sources._KEYS_) {
|
|
|
|
spfx = $${lpfx}.sources.$${s}
|
|
|
|
# link back to parent object
|
|
|
|
$${spfx}.library = $$l
|
|
|
|
export($${spfx}.library)
|
|
|
|
# a plain string is transformed into a structure
|
|
|
|
isEmpty($${spfx}._KEYS_) {
|
|
|
|
$${spfx}.libs = $$eval($${spfx})
|
|
|
|
export($${spfx}.libs)
|
|
|
|
}
|
|
|
|
# if the type is missing (implicitly in the case of plain strings), assume 'inline'
|
|
|
|
isEmpty($${spfx}.type) {
|
|
|
|
$${spfx}.type = inline
|
|
|
|
export($${spfx}.type)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-02-08 18:38:31 +00:00
|
|
|
$${currentConfig}.exports._KEYS_ = $$unique($${currentConfig}.exports._KEYS_)
|
|
|
|
export($${currentConfig}.exports._KEYS_)
|
2016-08-10 10:34:24 +00:00
|
|
|
|
2017-02-08 20:22:08 +00:00
|
|
|
for (alias, $${currentConfig}.exports._KEYS_) {
|
|
|
|
ua = $$upper($$alias)
|
|
|
|
$${asspfx}._KEYS_ += \
|
|
|
|
$${ua}_PREFIX $${ua}_INCDIR $${ua}_LIBDIR \
|
|
|
|
$${ua}_LIBS $${ua}_LIBS_DEBUG $${ua}_LIBS_RELEASE
|
|
|
|
uapfx = $${asspfx}.$${ua}
|
|
|
|
$${uapfx}_PREFIX = $${alias}.prefix
|
|
|
|
$${uapfx}_INCDIR = $${alias}.incdir
|
|
|
|
$${uapfx}_LIBDIR = $${alias}.libdir
|
|
|
|
$${uapfx}_LIBS = $${alias}.libs
|
|
|
|
$${uapfx}_LIBS_DEBUG = $${alias}.libs.debug
|
|
|
|
$${uapfx}_LIBS_RELEASE = $${alias}.libs.release
|
|
|
|
export($${uapfx}_PREFIX)
|
|
|
|
export($${uapfx}_INCDIR)
|
|
|
|
export($${uapfx}_LIBDIR)
|
|
|
|
export($${uapfx}_LIBS)
|
|
|
|
export($${uapfx}_LIBS_DEBUG)
|
|
|
|
export($${uapfx}_LIBS_RELEASE)
|
|
|
|
}
|
|
|
|
export($${asspfx}._KEYS_)
|
2016-08-10 10:34:24 +00:00
|
|
|
|
|
|
|
# reverse mapping for assignments on command line.
|
2017-02-08 20:22:08 +00:00
|
|
|
for (a, $${asspfx}._KEYS_) {
|
|
|
|
apfx = $${asspfx}.$${a}
|
2016-08-10 10:34:24 +00:00
|
|
|
ra = config.commandline.rev_assignments.$$eval($$apfx)
|
|
|
|
$$ra = $$a
|
|
|
|
export($$ra)
|
|
|
|
}
|
2016-08-15 12:40:52 +00:00
|
|
|
}
|
|
|
|
|
2017-12-01 19:13:08 +00:00
|
|
|
# libs-var, libs, in-paths, out-paths-var
|
|
|
|
defineTest(qtConfResolveLibs) {
|
|
|
|
ret = true
|
|
|
|
paths = $$3
|
|
|
|
out =
|
|
|
|
copy = false
|
|
|
|
for (l, 2) {
|
|
|
|
$$copy {
|
|
|
|
copy = false
|
|
|
|
out += $$l
|
|
|
|
} else: equals(l, "-s") {
|
|
|
|
# em++ flag to link libraries from emscripten-ports; passed on literally.
|
|
|
|
copy = true
|
|
|
|
out += $$l
|
|
|
|
} else: contains(l, "^-L.*") {
|
|
|
|
lp = $$replace(l, "^-L", )
|
|
|
|
!exists($$lp/.) {
|
|
|
|
qtLog("Library path $$val_escape(lp) is invalid.")
|
|
|
|
ret = false
|
|
|
|
} else {
|
|
|
|
paths += $$lp
|
|
|
|
}
|
|
|
|
} else: contains(l, "^-l.*") {
|
|
|
|
lib = $$replace(l, "^-l", )
|
|
|
|
lcan =
|
|
|
|
unix {
|
|
|
|
# Under UNIX, we look for actual shared libraries, in addition
|
|
|
|
# to static ones.
|
2019-01-11 15:10:54 +00:00
|
|
|
shexts = $$QMAKE_EXTENSION_SHLIB $$QMAKE_EXTENSIONS_AUX_SHLIB
|
|
|
|
for (ext, shexts) {
|
|
|
|
lcan += $${QMAKE_PREFIX_SHLIB}$${lib}.$${ext}
|
|
|
|
}
|
2017-12-01 19:13:08 +00:00
|
|
|
lcan += \
|
|
|
|
$${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB}
|
|
|
|
} else {
|
|
|
|
# Under Windows, we look only for static libraries, as even for DLLs
|
|
|
|
# one actually links against a static import library.
|
|
|
|
mingw {
|
|
|
|
lcan += \
|
|
|
|
# MinGW supports UNIX-style library naming in addition to
|
|
|
|
# the MSVC style.
|
|
|
|
lib$${lib}.dll.a lib$${lib}.a \
|
|
|
|
# Fun fact: prefix-less libraries are also supported.
|
|
|
|
$${lib}.dll.a $${lib}.a
|
|
|
|
}
|
|
|
|
lcan += $${lib}.lib
|
|
|
|
}
|
|
|
|
l = $$qtConfFindInPathList($$lcan, $$paths $$EXTRA_LIBDIR $$QMAKE_DEFAULT_LIBDIRS)
|
|
|
|
isEmpty(l) {
|
|
|
|
qtLog("None of [$$val_escape(lcan)] found in [$$val_escape(paths)] and global paths.")
|
|
|
|
ret = false
|
|
|
|
} else {
|
|
|
|
out += $$l
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
out += $$l
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$$1 = $$out
|
|
|
|
export($$1)
|
|
|
|
!isEmpty(4) {
|
|
|
|
$$4 = $$paths
|
|
|
|
export($$4)
|
|
|
|
}
|
|
|
|
return($$ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
# source-var
|
|
|
|
defineTest(qtConfResolveAllLibs) {
|
|
|
|
ret = true
|
|
|
|
!qtConfResolveLibs($${1}.libs, $$eval($${1}.libs), , $${1}.libdirs): \
|
|
|
|
ret = false
|
|
|
|
for (b, $${1}.builds._KEYS_): \
|
|
|
|
!qtConfResolveLibs($${1}.builds.$${b}, $$eval($${1}.builds.$${b}), $$eval($${1}.libdirs), ): \
|
|
|
|
ret = false
|
|
|
|
return($$ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
# libs-var, in-paths, libs
|
|
|
|
defineTest(qtConfResolvePathLibs) {
|
|
|
|
ret = true
|
|
|
|
for (libdir, 2) {
|
|
|
|
!exists($$libdir/.) {
|
|
|
|
qtLog("Library path $$val_escape(libdir) is invalid.")
|
|
|
|
ret = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
!qtConfResolveLibs($$1, $$3, $$2): \
|
|
|
|
ret = false
|
|
|
|
return($$ret)
|
|
|
|
}
|
|
|
|
|
2018-07-13 16:33:17 +00:00
|
|
|
defineReplace(qtConfGetTestSourceList) {
|
|
|
|
result =
|
|
|
|
!isEmpty($${1}.test.inherit) {
|
|
|
|
base = $$section(1, ., 0, -2)
|
|
|
|
for (i, $${1}.test.inherit): \
|
|
|
|
result += $$qtConfGetTestSourceList($${base}.$$i)
|
|
|
|
}
|
|
|
|
return($$result $$1)
|
|
|
|
}
|
|
|
|
|
2017-12-07 18:30:07 +00:00
|
|
|
defineReplace(qtConfGetTestIncludes) {
|
|
|
|
defined($${1}._KEYS_, var) {
|
|
|
|
1st = $$first($${1}._KEYS_)
|
|
|
|
equals(1st, 0) {
|
|
|
|
# array; recurse for every element
|
|
|
|
ret =
|
|
|
|
for (k, $${1}._KEYS_): \
|
|
|
|
ret += $$qtConfGetTestIncludes($${1}.$$k)
|
|
|
|
return($$ret)
|
|
|
|
}
|
|
|
|
# object; try condition and recurse
|
|
|
|
!defined($${1}.headers, var):!defined($${1}.headers._KEYS_, var): \ # just plain broken without it
|
|
|
|
error("headers object '$$1' has no nested headers entry")
|
|
|
|
cond = $$eval($${1}.condition)
|
|
|
|
isEmpty(cond): \ # would be pointless otherwise
|
|
|
|
error("headers object '$$1' has no condition")
|
|
|
|
!$$qtConfEvaluate($$cond) {
|
|
|
|
qtLog("header entry '$$1' failed condition '$$cond'.")
|
|
|
|
return()
|
|
|
|
}
|
|
|
|
qtLog("header entry '$$1' passed condition.")
|
|
|
|
return($$qtConfGetTestIncludes($${1}.headers))
|
|
|
|
}
|
|
|
|
return($$eval($$1)) # plain string - or nothing (can happen for top-level call only)
|
|
|
|
}
|
|
|
|
|
|
|
|
# includes-var, in-paths, test-object-var
|
2017-12-01 19:13:08 +00:00
|
|
|
defineTest(qtConfResolvePathIncs) {
|
|
|
|
ret = true
|
|
|
|
for (incdir, 2) {
|
|
|
|
!exists($$incdir/.) {
|
|
|
|
qtLog("Include path $$val_escape(incdir) is invalid.")
|
|
|
|
ret = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
2 -= $$QMAKE_DEFAULT_INCDIRS
|
|
|
|
$$1 = $$2
|
|
|
|
export($$1)
|
2017-12-07 18:30:07 +00:00
|
|
|
wasm {
|
|
|
|
# FIXME: emcc downloads pre-built libraries and adds their include
|
|
|
|
# path to the clang call dynamically. it would be possible to parse
|
|
|
|
# the emcc -s USE_xyz=1 --cflags output to populate xzy_INCDIR and
|
|
|
|
# thus make the code below work.
|
|
|
|
return($$ret)
|
|
|
|
}
|
2018-07-13 16:33:17 +00:00
|
|
|
tests = $$qtConfGetTestSourceList($$3)
|
|
|
|
hdrs =
|
|
|
|
for (test, tests): \
|
|
|
|
hdrs += $$qtConfGetTestIncludes($${test}.headers)
|
2017-12-07 18:30:07 +00:00
|
|
|
for (hdr, hdrs) {
|
|
|
|
h = $$qtConfFindInPathList($$hdr, $$2 $$EXTRA_INCLUDEPATH $$QMAKE_DEFAULT_INCDIRS)
|
|
|
|
isEmpty(h) {
|
|
|
|
qtLog("$$hdr not found in [$$val_escape(2)] and global paths.")
|
|
|
|
ret = false
|
|
|
|
}
|
|
|
|
}
|
2017-12-01 19:13:08 +00:00
|
|
|
return($$ret)
|
|
|
|
}
|
|
|
|
|
2016-08-15 12:40:52 +00:00
|
|
|
# the library is specified inline in a 'libs' field.
|
2016-08-10 10:34:24 +00:00
|
|
|
# overrides from the command line are accepted.
|
2016-08-15 12:40:52 +00:00
|
|
|
defineTest(qtConfLibrary_inline) {
|
|
|
|
lib = $$eval($${1}.library)
|
2017-07-26 08:48:21 +00:00
|
|
|
!defined($${1}.libs, var):isEmpty($${1}.builds._KEYS_): \
|
|
|
|
error("'inline' source in library '$$lib' specifies neither 'libs' nor 'builds'.")
|
2016-08-10 10:34:24 +00:00
|
|
|
|
2018-04-17 16:32:30 +00:00
|
|
|
# library lists are specified as strings in the json sources for
|
|
|
|
# readability, but it's a pain to work with that, so expand it now.
|
|
|
|
eval($${1}.libs = $$eval($${1}.libs))
|
|
|
|
export($${1}.libs)
|
|
|
|
for (b, $${1}.builds._KEYS_) {
|
|
|
|
eval($${1}.builds.$${b} = $$eval($${1}.builds.$${b}))
|
|
|
|
export($${1}.builds.$${b})
|
|
|
|
}
|
|
|
|
|
2017-02-01 15:57:49 +00:00
|
|
|
# if multiple libraries provide the same export, it makes sense
|
|
|
|
# to make them recognize the same input variables.
|
|
|
|
input = $$eval($${2}.alias)
|
|
|
|
|
2016-08-10 10:34:24 +00:00
|
|
|
# build-specific direct libs. overwrites inline libs.
|
|
|
|
vars =
|
|
|
|
any = false
|
|
|
|
all = true
|
2017-11-23 18:19:36 +00:00
|
|
|
for (b, $$list(debug release)) {
|
2017-02-01 15:57:49 +00:00
|
|
|
iv = $${input}.libs.$${b}
|
2016-08-10 10:34:24 +00:00
|
|
|
vars += $$eval(config.commandline.rev_assignments.$${iv})
|
|
|
|
defined(config.input.$${iv}, var) {
|
2018-04-17 16:32:30 +00:00
|
|
|
eval($${1}.builds.$${b} = $$eval(config.input.$${iv}))
|
2017-11-23 18:19:36 +00:00
|
|
|
$${1}.builds._KEYS_ *= $${b}
|
2016-08-10 10:34:24 +00:00
|
|
|
any = true
|
|
|
|
} else {
|
|
|
|
all = false
|
|
|
|
}
|
|
|
|
}
|
2017-11-23 18:19:36 +00:00
|
|
|
$$any {
|
|
|
|
!$$all {
|
|
|
|
qtConfAddError("Either none or all of $$join(vars, ", ", [, ]) must be specified.")
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
export($${1}.builds._KEYS_)
|
2017-11-23 18:33:39 +00:00
|
|
|
# we also reset the generic libs, to avoid surprises.
|
|
|
|
$${1}.libs =
|
|
|
|
}
|
|
|
|
|
|
|
|
# direct libs. overwrites inline libs.
|
2017-12-01 19:13:08 +00:00
|
|
|
defined(config.input.$${input}.libs, var): \
|
2018-04-17 16:32:30 +00:00
|
|
|
eval($${1}.libs = $$eval(config.input.$${input}.libs))
|
2017-12-01 19:13:08 +00:00
|
|
|
|
|
|
|
includes = $$eval(config.input.$${input}.incdir)
|
2016-08-10 10:34:24 +00:00
|
|
|
|
|
|
|
# prefix. prepends to (possibly overwritten) inline libs.
|
2018-04-17 16:32:30 +00:00
|
|
|
prefix = $$eval(config.input.$${input}.prefix)
|
2016-08-10 10:34:24 +00:00
|
|
|
!isEmpty(prefix) {
|
2017-12-01 19:13:08 +00:00
|
|
|
includes += $$prefix/include
|
2018-04-17 16:32:30 +00:00
|
|
|
$${1}.libs = -L$$prefix/lib $$eval($${1}.libs)
|
2017-02-08 20:22:08 +00:00
|
|
|
}
|
|
|
|
|
2018-04-17 16:32:30 +00:00
|
|
|
libdir = $$eval(config.input.$${input}.libdir)
|
2018-12-14 16:49:43 +00:00
|
|
|
!isEmpty(libdir) {
|
|
|
|
libs =
|
|
|
|
for (ld, libdir): \
|
|
|
|
libs += -L$$ld
|
|
|
|
$${1}.libs = $$libs $$eval($${1}.libs)
|
|
|
|
}
|
2017-12-01 19:13:08 +00:00
|
|
|
|
|
|
|
!qtConfResolveAllLibs($$1): \
|
|
|
|
return(false)
|
|
|
|
|
2017-12-07 18:30:07 +00:00
|
|
|
!qtConfResolvePathIncs($${1}.includedir, $$includes, $$2): \
|
2017-12-01 19:13:08 +00:00
|
|
|
return(false)
|
2017-02-08 20:22:08 +00:00
|
|
|
|
2016-08-15 12:40:52 +00:00
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
# the library is provided by the qmake spec.
|
|
|
|
# this source type cannot fail.
|
|
|
|
defineTest(qtConfLibrary_makeSpec) {
|
|
|
|
spec = $$eval($${1}.spec)
|
|
|
|
isEmpty(spec): \
|
|
|
|
error("makeSpec source in library '$$eval($${1}.library)' does not specify 'spec'.")
|
|
|
|
|
2017-12-01 19:13:08 +00:00
|
|
|
!qtConfResolvePathLibs($${1}.libs, $$eval(QMAKE_LIBDIR_$$spec), $$eval(QMAKE_LIBS_$$spec)): \
|
|
|
|
return(false)
|
|
|
|
|
2017-12-07 18:30:07 +00:00
|
|
|
!qtConfResolvePathIncs($${1}.includedir, $$eval(QMAKE_INCDIR_$$spec), $$2): \
|
2017-12-01 19:13:08 +00:00
|
|
|
return(false)
|
2016-08-15 12:40:52 +00:00
|
|
|
|
2017-12-01 19:13:08 +00:00
|
|
|
# note that the object is re-exported, because we resolve the libraries.
|
2016-08-15 12:40:52 +00:00
|
|
|
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
# the library is found via pkg-config.
|
|
|
|
defineTest(qtConfLibrary_pkgConfig) {
|
2016-06-11 20:49:01 +00:00
|
|
|
pkg_config = $$qtConfPkgConfig($$eval($${1}.host))
|
2016-12-23 14:48:54 +00:00
|
|
|
isEmpty(pkg_config) {
|
|
|
|
qtLog("pkg-config use disabled globally.")
|
2016-07-15 16:26:55 +00:00
|
|
|
return(false)
|
2016-12-23 14:48:54 +00:00
|
|
|
}
|
2016-08-15 12:40:52 +00:00
|
|
|
args = $$qtConfPrepareArgs($$eval($${1}.args))
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-12-23 14:48:54 +00:00
|
|
|
!qtConfPkgConfigPackageExists($$pkg_config, $$args) {
|
|
|
|
qtLog("pkg-config did not find package.")
|
2016-06-11 20:49:01 +00:00
|
|
|
return(false)
|
2016-12-23 14:48:54 +00:00
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-08-01 11:04:24 +00:00
|
|
|
qtRunLoggedCommand("$$pkg_config --modversion $$args", version)|return(false)
|
2016-08-24 07:29:47 +00:00
|
|
|
version ~= s/[^0-9.].*$//
|
2016-06-11 20:49:01 +00:00
|
|
|
$${1}.version = $$first(version)
|
|
|
|
export($${1}.version)
|
2017-12-01 19:13:08 +00:00
|
|
|
|
|
|
|
qtRunLoggedCommand("$$pkg_config --libs-only-L $$args", libpaths)|return(false)
|
|
|
|
qtRunLoggedCommand("$$pkg_config --libs-only-l $$args", libs)|return(false)
|
|
|
|
eval(libs = $$libpaths $$libs)
|
|
|
|
!qtConfResolveLibs($${1}.libs, $$libs): \
|
|
|
|
return(false)
|
2017-12-04 16:36:11 +00:00
|
|
|
contains($${1}.libs, ".*\\.$${QMAKE_EXTENSION_STATICLIB}$") {
|
|
|
|
qtRunLoggedCommand("$$pkg_config --static --libs-only-L $$args", libpaths)|return(false)
|
|
|
|
qtRunLoggedCommand("$$pkg_config --static --libs-only-l $$args", libs)|return(false)
|
|
|
|
eval(libs = $$libpaths $$libs)
|
|
|
|
!qtConfResolveLibs($${1}.libs, $$libs): \
|
|
|
|
return(false)
|
|
|
|
}
|
2017-12-01 18:36:15 +00:00
|
|
|
|
|
|
|
qtRunLoggedCommand("$$pkg_config --cflags $$args", $${1}.cflags)|return(false)
|
|
|
|
# Split CFLAGS into stuff that goes into DEFINES, INCLUDEPATH, and other stuff.
|
|
|
|
# The compound variable is still set in case something wants to use it outside
|
|
|
|
# regular library exports.
|
|
|
|
defines =
|
|
|
|
includes =
|
|
|
|
ignored =
|
|
|
|
eval(cflags = $$eval($${1}.cflags))
|
|
|
|
for (i, cflags) {
|
|
|
|
contains(i, "-I.*") {
|
|
|
|
i ~= s/^-I//
|
|
|
|
includes += $$i
|
|
|
|
} else: contains(i, "-D.*") {
|
|
|
|
i ~= s/^-D//
|
|
|
|
defines += $$i
|
|
|
|
} else {
|
|
|
|
# Sometimes, pkg-config files include other flags
|
|
|
|
# we really don't need and shouldn't add.
|
|
|
|
ignored += $$i
|
|
|
|
}
|
|
|
|
}
|
|
|
|
!isEmpty(ignored): \
|
|
|
|
qtLog("Note: Dropped compiler flags '$$ignored'.")
|
2017-12-07 18:30:07 +00:00
|
|
|
!qtConfResolvePathIncs($${1}.includedir, $$includes, $$2): \
|
2017-12-01 19:13:08 +00:00
|
|
|
return(false)
|
2017-12-01 18:36:15 +00:00
|
|
|
$${1}.defines = $$defines
|
2018-04-17 17:17:25 +00:00
|
|
|
|
|
|
|
# now remove the content of the transitive deps we know about.
|
|
|
|
largs = $$qtConfAllLibraryArgs($$eval($${2}.dependencies))
|
|
|
|
for (la, largs): \
|
|
|
|
eval("$$la")
|
2017-11-24 18:48:33 +00:00
|
|
|
USES = $$eval($$list($$upper($$replace(QMAKE_USE, -, _))))
|
2018-04-17 17:17:25 +00:00
|
|
|
# _CC == _LD for configure's library sources, so pick first arbitrarily.
|
|
|
|
DEPS = $$resolve_depends(USES, QMAKE_DEPENDS_, _CC)
|
|
|
|
for (DEP, DEPS) {
|
|
|
|
$${1}.libs -= $$eval(QMAKE_LIBS_$${DEP})
|
|
|
|
$${1}.includedir -= $$eval(QMAKE_INCDIR_$${DEP})
|
|
|
|
$${1}.defines -= $$eval(QMAKE_DEFINES_$${DEP})
|
|
|
|
}
|
|
|
|
export($${1}.libs)
|
|
|
|
export($${1}.includedir)
|
2017-12-01 18:36:15 +00:00
|
|
|
export($${1}.defines)
|
2017-12-01 19:13:08 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfTest_getPkgConfigVariable) {
|
|
|
|
pkg_config = $$qtConfPkgConfig($$eval($${1}.host))
|
2016-07-15 16:26:55 +00:00
|
|
|
isEmpty(pkg_config): \
|
|
|
|
return(false)
|
2016-06-11 20:49:01 +00:00
|
|
|
args = $$qtConfPrepareArgs($$eval($${1}.pkg-config-args))
|
|
|
|
|
|
|
|
!qtConfPkgConfigPackageExists($$pkg_config, $$args): \
|
|
|
|
return(false)
|
|
|
|
|
|
|
|
variable = $$eval($${1}.pkg-config-variable)
|
2016-08-01 11:04:24 +00:00
|
|
|
qtRunLoggedCommand("$$pkg_config --variable=$$variable $$args", $${1}.value)|return(false)
|
2016-06-11 20:49:01 +00:00
|
|
|
export($${1}.value)
|
2016-08-16 18:03:54 +00:00
|
|
|
$${1}.cache += value
|
|
|
|
export($${1}.cache)
|
2016-06-11 20:49:01 +00:00
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
2016-08-15 12:40:52 +00:00
|
|
|
defineReplace(qtConfLibraryArgs) {
|
2017-11-24 18:48:33 +00:00
|
|
|
NAME = $$upper($$replace($${1}.library, -, _))
|
2018-04-17 16:32:30 +00:00
|
|
|
qmake_args = "QMAKE_LIBS_$${NAME} = $$val_escape($${1}.libs)"
|
2016-08-15 12:40:52 +00:00
|
|
|
for (b, $${1}.builds._KEYS_): \
|
2018-04-17 16:32:30 +00:00
|
|
|
qmake_args += "QMAKE_LIBS_$${NAME}_$$upper($$b) = $$val_escape($${1}.builds.$${b})"
|
2016-08-15 12:40:52 +00:00
|
|
|
includedir = $$eval($${1}.includedir)
|
|
|
|
!isEmpty(includedir): \
|
2018-04-17 16:32:30 +00:00
|
|
|
qmake_args += "QMAKE_INCDIR_$${NAME} = $$val_escape(includedir)"
|
2017-12-01 18:36:15 +00:00
|
|
|
defines = $$eval($${1}.defines)
|
|
|
|
!isEmpty(defines): \
|
|
|
|
qmake_args += "QMAKE_DEFINES_$${NAME} = $$val_escape(defines)"
|
2018-04-17 17:17:25 +00:00
|
|
|
depends = $$eval($${2}.dependencies)
|
|
|
|
!isEmpty(depends) {
|
|
|
|
dep_uses =
|
|
|
|
for (use, depends): \
|
|
|
|
dep_uses += $$section(use, :, 1, 1)
|
|
|
|
qmake_args += \
|
2017-11-24 18:48:33 +00:00
|
|
|
"QMAKE_DEPENDS_$${NAME}_CC = $$upper($$replace(dep_uses, -, _))" \
|
|
|
|
"QMAKE_DEPENDS_$${NAME}_LD = $$upper($$replace(dep_uses, -, _))"
|
2018-04-17 17:17:25 +00:00
|
|
|
}
|
2016-08-15 12:40:52 +00:00
|
|
|
return($$qmake_args)
|
|
|
|
}
|
|
|
|
|
2017-11-23 20:20:32 +00:00
|
|
|
defineReplace(qtConfAllLibraryArgs) {
|
|
|
|
isEmpty(1): return()
|
|
|
|
dep_uses =
|
2018-04-17 17:17:25 +00:00
|
|
|
for (use, 1): \
|
|
|
|
dep_uses += $$section(use, :, 1, 1)
|
2017-11-23 20:20:32 +00:00
|
|
|
dep_args =
|
2018-04-17 17:17:25 +00:00
|
|
|
seen =
|
|
|
|
for(ever) {
|
|
|
|
isEmpty(1): break()
|
|
|
|
use = $$take_last(1)
|
|
|
|
contains(seen, $$use): next()
|
|
|
|
seen += $$use
|
2017-11-23 20:20:32 +00:00
|
|
|
use_cfg = $$section(use, :, 0, 0)
|
|
|
|
!isEmpty(use_cfg) {
|
2018-04-17 17:17:25 +00:00
|
|
|
use_lib = $$section(use, :, 1, 1)
|
2017-11-23 20:20:32 +00:00
|
|
|
lpfx = $${use_cfg}.libraries.$$use_lib
|
2018-04-17 17:17:25 +00:00
|
|
|
dep_args += $$qtConfLibraryArgs($${lpfx}.sources.$$eval($${lpfx}.source), $$lpfx)
|
|
|
|
1 += $$eval($${lpfx}.dependencies)
|
2017-11-23 20:20:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return("QMAKE_USE += $$dep_uses" $$dep_args)
|
|
|
|
}
|
|
|
|
|
2016-08-15 12:40:52 +00:00
|
|
|
defineTest(qtConfExportLibrary) {
|
2017-01-18 16:20:02 +00:00
|
|
|
lpfx = $${currentConfig}.libraries.$$1
|
2017-02-09 11:11:55 +00:00
|
|
|
alias = $$eval($${lpfx}.alias)
|
|
|
|
$${currentConfig}.found.$$alias = $$1
|
|
|
|
export($${currentConfig}.found.$$alias)
|
2017-01-18 16:20:02 +00:00
|
|
|
name = $$eval($${lpfx}.export)
|
|
|
|
isEmpty(name): return()
|
|
|
|
spfx = $${lpfx}.sources.$$eval($${lpfx}.source)
|
|
|
|
!$$qtConfEvaluate($$eval($${spfx}.export)): return()
|
2016-08-15 12:40:52 +00:00
|
|
|
|
|
|
|
output = privatePro
|
2017-01-18 16:20:02 +00:00
|
|
|
NAME = $$upper($$name)
|
2017-01-18 13:46:35 +00:00
|
|
|
# LIBS is emitted even if empty, as this allows the library to be "seen".
|
2017-12-01 18:36:15 +00:00
|
|
|
libs = $$eval($${spfx}.libs)
|
2017-01-18 13:46:35 +00:00
|
|
|
qtConfOutputVar(assign, $$output, QMAKE_LIBS_$$NAME, $$libs)
|
2017-11-23 17:05:53 +00:00
|
|
|
for (b, $${spfx}.builds._KEYS_) {
|
2018-04-17 16:32:30 +00:00
|
|
|
blibs = $$eval($${spfx}.builds.$${b})
|
2017-11-23 17:05:53 +00:00
|
|
|
qtConfOutputVar(assign, $$output, QMAKE_LIBS_$${NAME}_$$upper($$b), $$blibs)
|
|
|
|
}
|
2017-12-01 18:36:15 +00:00
|
|
|
defines = $$eval($${spfx}.defines)
|
2016-09-28 16:54:29 +00:00
|
|
|
!isEmpty(defines): qtConfOutputVar(assign, $$output, QMAKE_DEFINES_$$NAME, $$defines)
|
2017-12-01 18:36:15 +00:00
|
|
|
includes = $$eval($${spfx}.includedir)
|
2016-08-15 12:40:52 +00:00
|
|
|
!isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes)
|
2018-04-17 17:17:25 +00:00
|
|
|
uses = $$eval($${lpfx}.dependencies)
|
|
|
|
!isEmpty(uses) {
|
|
|
|
# FIXME: ideally, we would export transitive deps only for static
|
|
|
|
# libs, to not extend the link interface unduly. however, the system
|
|
|
|
# does currently not differentiate between public and private deps.
|
|
|
|
depends =
|
|
|
|
for (use, uses) {
|
|
|
|
use_cfg = $$section(use, :, 0, 0)
|
|
|
|
use_lib = $$section(use, :, 1, 1)
|
|
|
|
!isEmpty(use_cfg): \
|
|
|
|
depends += $$upper($$eval($${use_cfg}.libraries.$${use_lib}.export))
|
|
|
|
else: \
|
2017-11-24 18:48:33 +00:00
|
|
|
depends += $$upper($$replace(use_lib, -, _))
|
2018-04-17 17:17:25 +00:00
|
|
|
}
|
|
|
|
# we use suffixes instead of infixes, because $$resolve_depends() demands it.
|
|
|
|
qtConfOutputVar(assign, $$output, QMAKE_DEPENDS_$${NAME}_CC, $$depends)
|
|
|
|
qtConfOutputVar(assign, $$output, QMAKE_DEPENDS_$${NAME}_LD, $$depends)
|
|
|
|
}
|
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
|
|
|
!isEmpty($${currentConfig}.module): \
|
2017-01-18 16:20:02 +00:00
|
|
|
qtConfExtendVar($$output, "QT.$${currentModule}_private.libraries", $$name)
|
2016-08-15 12:40:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfHandleLibrary) {
|
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
|
|
|
lpfx = $${currentConfig}.libraries.$$1
|
2016-08-15 12:40:52 +00:00
|
|
|
defined($${lpfx}.result, var): return()
|
|
|
|
|
2017-02-09 11:11:55 +00:00
|
|
|
alias = $$eval($${lpfx}.alias)
|
|
|
|
!isEmpty($${currentConfig}.found.$$alias) {
|
|
|
|
# this happening indicates a logic error in the conditions
|
|
|
|
# of the feature(s) referring to this library.
|
|
|
|
# note that this does not look across module boundaries, as
|
|
|
|
# multiple modules may know the same libraries; de-duplication
|
|
|
|
# happens via the cache (obviously, this assumes identical
|
|
|
|
# definitions and logic).
|
|
|
|
error("A library exporting '$$alias' was already found.")
|
|
|
|
}
|
|
|
|
|
2016-08-12 08:14:51 +00:00
|
|
|
qtConfEnsureTestTypeDeps("library")
|
2017-02-09 15:56:03 +00:00
|
|
|
!qtConfTestPrepare_compile($$lpfx) {
|
|
|
|
$${lpfx}.result = false
|
|
|
|
export($${lpfx}.result)
|
|
|
|
return()
|
|
|
|
}
|
2018-04-17 17:17:25 +00:00
|
|
|
$${lpfx}.dependencies = $$eval($${lpfx}.resolved_uses)
|
|
|
|
export($${lpfx}.dependencies)
|
2016-08-12 08:14:51 +00:00
|
|
|
|
2017-12-05 18:58:50 +00:00
|
|
|
qtConfLoadResult($${lpfx}, $$1, "library") {
|
2016-08-25 13:51:27 +00:00
|
|
|
$$eval($${lpfx}.result): \
|
2017-01-18 16:20:02 +00:00
|
|
|
qtConfExportLibrary($$1)
|
2016-08-16 18:03:54 +00:00
|
|
|
return()
|
|
|
|
}
|
|
|
|
|
2016-11-02 17:00:16 +00:00
|
|
|
qtLogTestIntro($${lpfx}, "looking for library $${1}")
|
2017-12-05 18:58:50 +00:00
|
|
|
qtPersistLog()
|
2016-08-15 12:40:52 +00:00
|
|
|
|
|
|
|
result = false
|
|
|
|
for (s, $${lpfx}.sources._KEYS_) {
|
|
|
|
spfx = $${lpfx}.sources.$${s}
|
|
|
|
|
|
|
|
t = $$eval($${spfx}.type)
|
|
|
|
call = qtConfLibrary_$$t
|
|
|
|
!defined($$call, test): \
|
|
|
|
error("Library $${1} source $${s} has unknown type '$$t'")
|
|
|
|
|
2016-10-10 18:26:52 +00:00
|
|
|
qtLog("Trying source $$s (type $$t) of library $${1} ...")
|
|
|
|
|
2016-12-23 14:48:54 +00:00
|
|
|
cond = $$eval($${spfx}.condition)
|
|
|
|
!$$qtConfEvaluate($$cond) {
|
|
|
|
qtLog(" => source failed condition '$$cond'.")
|
2016-08-15 12:40:52 +00:00
|
|
|
next()
|
|
|
|
}
|
|
|
|
|
2017-02-01 15:57:49 +00:00
|
|
|
!$${call}($$spfx, $$lpfx) {
|
2016-10-10 18:26:52 +00:00
|
|
|
qtLog(" => source produced no result.")
|
2016-08-15 12:40:52 +00:00
|
|
|
next()
|
|
|
|
}
|
|
|
|
|
2017-11-23 20:20:32 +00:00
|
|
|
$${lpfx}.source = $$s
|
|
|
|
export($${lpfx}.source)
|
|
|
|
|
2016-08-15 12:40:52 +00:00
|
|
|
# if the library defines a test, use it to verify the source.
|
2018-05-03 15:37:10 +00:00
|
|
|
defined($${lpfx}.test, var)|defined($${lpfx}.test._KEYS_, var) {
|
2018-04-17 17:17:25 +00:00
|
|
|
$${lpfx}.resolved_uses = $$currentConfig:$$1
|
2016-08-15 12:40:52 +00:00
|
|
|
$${lpfx}.host = $$eval($${spfx}.host)
|
|
|
|
!qtConfTest_compile($$lpfx) {
|
2016-10-10 18:26:52 +00:00
|
|
|
qtLog(" => source failed verification.")
|
2016-08-15 12:40:52 +00:00
|
|
|
next()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-10 18:26:52 +00:00
|
|
|
qtLog(" => source accepted.")
|
|
|
|
|
2016-08-16 18:03:54 +00:00
|
|
|
$${lpfx}.cache += source
|
2016-11-11 17:59:16 +00:00
|
|
|
for (v, $$list(libs includedir cflags version export)): \
|
2016-08-16 18:03:54 +00:00
|
|
|
$${lpfx}.cache += sources.$${s}.$${v}
|
|
|
|
for (b, $${spfx}.builds._KEYS_): \
|
|
|
|
$${lpfx}.cache += sources.$${s}.builds.$${b}
|
|
|
|
|
2017-01-18 16:20:02 +00:00
|
|
|
# immediately output the library as well.
|
|
|
|
qtConfExportLibrary($$1)
|
|
|
|
|
2016-08-15 12:40:52 +00:00
|
|
|
result = true
|
|
|
|
break()
|
|
|
|
}
|
|
|
|
|
2017-12-05 18:58:50 +00:00
|
|
|
$${lpfx}.msgs = $$qtPersistedLog()
|
|
|
|
export($${lpfx}.msgs)
|
|
|
|
|
2016-08-15 12:40:52 +00:00
|
|
|
qtLogTestResult($${lpfx}, $$result)
|
|
|
|
|
|
|
|
$${lpfx}.result = $$result
|
|
|
|
export($${lpfx}.result)
|
2016-08-16 18:03:54 +00:00
|
|
|
qtConfSaveResult($${lpfx}, $$1)
|
2016-08-15 12:40:52 +00:00
|
|
|
}
|
|
|
|
|
2016-08-12 08:14:51 +00:00
|
|
|
# This is a fake test type for the test dependency system.
|
|
|
|
defineTest(qtConfTest_library) {
|
|
|
|
error("The test type 'library' may not be instantiated.")
|
|
|
|
}
|
|
|
|
|
2016-08-15 12:40:52 +00:00
|
|
|
defineTest(qtConfTestPrepare_compile) {
|
2017-02-10 17:25:32 +00:00
|
|
|
!isEmpty($${1}.use._KEYS_) {
|
|
|
|
uses =
|
|
|
|
for (k, $${1}.use._KEYS_) {
|
|
|
|
use = $$eval($${1}.use.$${k}.lib)
|
|
|
|
isEmpty(use): \
|
|
|
|
error("'use' entry $$k in test $$1 lacks 'lib' field.")
|
|
|
|
!$$qtConfEvaluate($$eval($${1}.use.$${k}.condition)): \
|
|
|
|
next()
|
|
|
|
uses += $$use
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
uses = $$split($${1}.use)
|
|
|
|
}
|
|
|
|
for (u, uses) {
|
2016-11-09 14:02:11 +00:00
|
|
|
libConfig =
|
2017-02-09 18:36:50 +00:00
|
|
|
exports = $$eval($${currentConfig}.exports.$$u)
|
|
|
|
!isEmpty(exports) {
|
|
|
|
# using a local library by exported name.
|
|
|
|
ru = $$eval($${currentConfig}.found.$$u)
|
|
|
|
!isEmpty(ru) {
|
|
|
|
# if it was already found, all is good.
|
|
|
|
u = $$ru
|
|
|
|
} else: count(exports, 1) {
|
|
|
|
# otherwise, if there is only one option, ensure it's resolved.
|
|
|
|
u = $$exports
|
|
|
|
qtConfHandleLibrary($$u)
|
|
|
|
} else {
|
|
|
|
# otherwise, verify that all options were resolved.
|
|
|
|
for (x, exports) {
|
|
|
|
isEmpty($${currentConfig}.libraries.$${x}.result) {
|
|
|
|
# the higher-level logic is in the features, which we cannot
|
|
|
|
# infer from here. so the only option is failing.
|
|
|
|
error("Test $$1 refers to yet unresolved library export '$$u'")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
libConfig = $$currentConfig
|
|
|
|
} else: contains($${currentConfig}.libraries._KEYS_, $$u) {
|
|
|
|
# using a local library by real name. this should be the exception.
|
2016-11-09 14:02:11 +00:00
|
|
|
qtConfHandleLibrary($$u)
|
2017-02-09 18:36:50 +00:00
|
|
|
libConfig = $$currentConfig
|
2016-11-09 14:02:11 +00:00
|
|
|
} else {
|
2017-02-09 16:35:30 +00:00
|
|
|
for (d, QMAKE_LIBRARY_DEPS) {
|
2017-02-09 18:36:50 +00:00
|
|
|
exports = $$eval($${d}.exports.$$u)
|
|
|
|
!isEmpty(exports) {
|
|
|
|
# using a foreign library by exported name.
|
|
|
|
# foreign libraries may be external (if they are from a different
|
|
|
|
# repository and the build is modular), and using these by real
|
|
|
|
# name is impossible. so for consistency, uses by real name are
|
|
|
|
# limited to local libraries.
|
|
|
|
ru = $$eval($${d}.found.$$u)
|
|
|
|
!isEmpty(ru) {
|
|
|
|
u = $$ru
|
|
|
|
libConfig = $$d
|
|
|
|
break()
|
|
|
|
}
|
|
|
|
for (x, exports) {
|
|
|
|
isEmpty($${d}.libraries.$${x}.result): \
|
|
|
|
error("Test $$1 refers to unresolved library export '$$u' in '$$d'")
|
|
|
|
}
|
|
|
|
return(false)
|
2016-11-09 14:02:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
isEmpty(libConfig) {
|
2017-11-24 18:48:33 +00:00
|
|
|
nu = $$upper($$replace(u, -, _))
|
2017-01-18 13:46:35 +00:00
|
|
|
!defined(QMAKE_LIBS_$$nu, var): \
|
2016-11-09 14:02:11 +00:00
|
|
|
error("Test $$1 tries to use undeclared library '$$u'")
|
2017-02-09 18:36:50 +00:00
|
|
|
# using an external library by exported name.
|
2017-11-23 20:20:32 +00:00
|
|
|
$${1}.resolved_uses += :$$u
|
2016-11-09 14:02:11 +00:00
|
|
|
} else {
|
|
|
|
lpfx = $${libConfig}.libraries.$${u}
|
2017-11-23 20:20:32 +00:00
|
|
|
!equals($${lpfx}.result, true): \
|
2016-11-09 14:02:11 +00:00
|
|
|
return(false)
|
2017-11-23 20:20:32 +00:00
|
|
|
$${1}.resolved_uses += $$libConfig:$$u
|
2016-11-09 14:02:11 +00:00
|
|
|
}
|
2016-08-15 12:40:52 +00:00
|
|
|
}
|
2017-11-23 20:20:32 +00:00
|
|
|
export($${1}.resolved_uses)
|
2016-08-15 12:40:52 +00:00
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
2017-08-01 16:30:33 +00:00
|
|
|
defineTest(qtConfPrepareCompileTestSource) {
|
2018-07-13 16:33:17 +00:00
|
|
|
test_dir = $$2
|
2017-08-01 16:30:33 +00:00
|
|
|
|
2018-07-13 16:33:17 +00:00
|
|
|
tests = $$qtConfGetTestSourceList($$1)
|
|
|
|
|
|
|
|
test_lang = "c++"
|
|
|
|
for (test, tests): \
|
|
|
|
test_lang += $$eval($${test}.test.lang)
|
|
|
|
test_lang = $$last(test_lang) # Last non-empty, that is.
|
2018-02-14 12:40:57 +00:00
|
|
|
|
|
|
|
equals(test_lang, "c++"): suffix = "cpp"
|
|
|
|
else: equals(test_lang, "c"): suffix = "c"
|
|
|
|
else: equals(test_lang, "objc"): suffix = "m"
|
|
|
|
else: equals(test_lang, "objc++"): suffix = "mm"
|
|
|
|
else: error("Unknown language '$$test_lang' in compile test $$1")
|
|
|
|
|
2017-08-01 16:30:33 +00:00
|
|
|
# Create source code
|
|
|
|
contents = "/* Generated by configure */"
|
|
|
|
# Custom code before includes
|
2018-07-13 16:33:17 +00:00
|
|
|
for (test, tests): \
|
|
|
|
for (ent, $$qtConfScalarOrList($${test}.test.head)): \
|
|
|
|
contents += $$ent
|
2017-08-01 16:30:33 +00:00
|
|
|
# Includes
|
2018-07-13 16:33:17 +00:00
|
|
|
for (test, tests) {
|
|
|
|
hdrs = $$qtConfGetTestIncludes($${test}.test.include)
|
|
|
|
isEmpty(hdrs): \
|
|
|
|
hdrs = $$qtConfGetTestIncludes($${test}.headers)
|
|
|
|
for (ent, hdrs): \
|
|
|
|
contents += "$${LITERAL_HASH}include <$$ent>"
|
|
|
|
}
|
2017-08-01 16:30:33 +00:00
|
|
|
# Custom code after includes
|
2018-07-13 16:33:17 +00:00
|
|
|
for (test, tests): \
|
|
|
|
for (ent, $$qtConfScalarOrList($${test}.test.tail)): \
|
|
|
|
contents += $$ent
|
2017-08-01 16:30:33 +00:00
|
|
|
# And finally the custom code inside main()
|
|
|
|
contents += \
|
|
|
|
"int main(int argc, char **argv)" \
|
|
|
|
"{" \
|
|
|
|
" (void)argc; (void)argv;" \
|
|
|
|
" /* BEGIN TEST: */"
|
2018-07-13 16:33:17 +00:00
|
|
|
for (test, tests): \
|
|
|
|
for (ent, $$qtConfScalarOrList($${test}.test.main)): \
|
|
|
|
contents += " $$ent"
|
2017-08-01 16:30:33 +00:00
|
|
|
contents += \
|
|
|
|
" /* END TEST */" \
|
|
|
|
" return 0;" \
|
|
|
|
"}"
|
2018-02-14 12:40:57 +00:00
|
|
|
write_file($$test_dir/main.$$suffix, contents)|error()
|
2017-08-01 16:30:33 +00:00
|
|
|
|
2018-07-13 19:25:12 +00:00
|
|
|
for (test, tests) {
|
|
|
|
for (file, $$qtConfScalarOrList($${test}.test.files._KEYS_)): \
|
|
|
|
write_file($$test_dir/$$file, $$qtConfScalarOrList($${test}.test.files.$${file}))|error()
|
|
|
|
}
|
|
|
|
|
2017-08-01 16:30:33 +00:00
|
|
|
# Create stub .pro file
|
2018-02-14 12:40:57 +00:00
|
|
|
contents = "SOURCES = main.$$suffix"
|
2017-08-01 16:30:33 +00:00
|
|
|
# Custom project code
|
2018-07-16 10:10:19 +00:00
|
|
|
pwd = $$val_escape($${currentConfig}.dir)
|
2018-07-13 16:33:17 +00:00
|
|
|
for (test, tests): \
|
|
|
|
for (ent, $$qtConfScalarOrList($${test}.test.qmake)): \
|
2018-07-16 10:10:19 +00:00
|
|
|
contents += $$replace(ent, "@PWD@", $$pwd)
|
2017-08-01 16:30:33 +00:00
|
|
|
write_file($$test_dir/$$basename(test_dir).pro, contents)|error()
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtConfTest_compile) {
|
|
|
|
test = $$eval($${1}.test)
|
2016-06-29 09:39:27 +00:00
|
|
|
host = $$eval($${1}.host)
|
|
|
|
isEmpty(host): host = false
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2017-05-15 12:14:28 +00:00
|
|
|
test_base_out_dir = $$OUT_PWD/$$basename(QMAKE_CONFIG_TESTS_DIR)
|
2017-08-01 16:30:33 +00:00
|
|
|
isEmpty(test) {
|
|
|
|
test_dir = $$test_base_out_dir/$$section(1, ".", -1)
|
|
|
|
test_out_dir = $$test_dir
|
2018-07-13 16:33:17 +00:00
|
|
|
qtConfPrepareCompileTestSource($$1, $$test_dir)
|
2017-08-01 16:30:33 +00:00
|
|
|
} else {
|
|
|
|
test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$test
|
|
|
|
test_out_dir = $$test_base_out_dir/$$test
|
|
|
|
!isEmpty($${1}.pro): \
|
|
|
|
test_dir = $$test_dir/$$eval($${1}.pro)
|
|
|
|
}
|
2016-11-11 09:02:34 +00:00
|
|
|
test_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$test_out_dir)) &&"
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-07-15 13:57:43 +00:00
|
|
|
qmake_args = $$qtConfPkgConfigEnv()$$system_quote($$system_path($$QMAKE_QMAKE))
|
|
|
|
!isEmpty(QMAKE_QTCONF): \
|
|
|
|
qmake_args += -qtconf $$system_quote($$QMAKE_QTCONF)
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# Disable qmake features which are typically counterproductive for tests
|
2016-11-01 20:15:47 +00:00
|
|
|
qmake_args += "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\""
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
# allow tests to behave differently depending on the type of library
|
|
|
|
# being built (shared/static). e.g. see config.tests/unix/icu
|
|
|
|
shared: \
|
2016-06-27 08:56:50 +00:00
|
|
|
qmake_configs = "shared"
|
2016-06-11 20:49:01 +00:00
|
|
|
else: \
|
2016-06-27 08:56:50 +00:00
|
|
|
qmake_configs = "static"
|
|
|
|
|
2016-07-29 17:58:33 +00:00
|
|
|
use_gold_linker: \
|
|
|
|
qmake_configs += "use_gold_linker"
|
|
|
|
|
2017-08-08 04:15:56 +00:00
|
|
|
# disable warnings from the builds, since they're just noise at this point.
|
|
|
|
qmake_configs += "warn_off"
|
|
|
|
|
2016-06-27 08:56:50 +00:00
|
|
|
# add console to the CONFIG variable when running the tests, so that they
|
|
|
|
# can work with a regular main() entry point on Windows.
|
|
|
|
qmake_configs += "console"
|
|
|
|
|
2016-09-21 03:18:45 +00:00
|
|
|
# for platforms with multiple architectures (macOS, iOS, tvOS, watchOS),
|
|
|
|
# make sure tests are only built for a single architecture
|
|
|
|
qmake_configs += "single_arch"
|
|
|
|
|
2016-06-27 08:56:50 +00:00
|
|
|
qmake_args += "\"CONFIG += $$qmake_configs\""
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2017-02-03 17:23:04 +00:00
|
|
|
!$$host|!cross_compile {
|
2016-07-05 12:45:24 +00:00
|
|
|
# On WinRT we need to change the entry point as we cannot create windows
|
|
|
|
# applications
|
|
|
|
winrt: \
|
|
|
|
qmake_args += " \"QMAKE_LFLAGS += /ENTRY:main\""
|
|
|
|
|
2016-06-29 09:39:27 +00:00
|
|
|
# add compiler flags, these are set for the target and should not be applied to host tests
|
|
|
|
!isEmpty(EXTRA_DEFINES): \
|
2016-07-14 19:13:11 +00:00
|
|
|
qmake_args += $$system_quote(DEFINES += $$val_escape(EXTRA_DEFINES))
|
2018-04-26 16:56:00 +00:00
|
|
|
!isEmpty(EXTRA_LIBDIR): \
|
2016-07-14 19:13:11 +00:00
|
|
|
qmake_args += $$system_quote(QMAKE_LIBDIR += $$val_escape(EXTRA_LIBDIR))
|
2018-04-26 16:56:00 +00:00
|
|
|
!isEmpty(EXTRA_FRAMEWORKPATH): \
|
2016-07-14 19:13:11 +00:00
|
|
|
qmake_args += $$system_quote(QMAKE_FRAMEWORKPATH += $$val_escape(EXTRA_FRAMEWORKPATH))
|
2016-06-29 09:39:27 +00:00
|
|
|
!isEmpty(EXTRA_INCLUDEPATH): \
|
2016-07-14 19:13:11 +00:00
|
|
|
qmake_args += $$system_quote(INCLUDEPATH += $$val_escape(EXTRA_INCLUDEPATH))
|
2016-06-27 08:56:50 +00:00
|
|
|
qmake_args += $$EXTRA_QMAKE_ARGS
|
2016-06-29 09:39:27 +00:00
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2017-02-03 17:23:04 +00:00
|
|
|
# make sure to make this the last override (because of -early)
|
|
|
|
cross_compile {
|
|
|
|
# must be done before loading default_pre.prf.
|
|
|
|
qmake_args += -early "\"CONFIG += cross_compile\""
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# Clean up after previous run
|
2016-07-15 16:21:00 +00:00
|
|
|
exists($$test_out_dir/Makefile): \
|
|
|
|
QMAKE_MAKE = "$$QMAKE_MAKE clean && $$QMAKE_MAKE"
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-07-14 14:50:02 +00:00
|
|
|
mkpath($$test_out_dir)|error()
|
2018-05-02 10:24:59 +00:00
|
|
|
cont = "CONFIG += QTDIR_build"
|
|
|
|
write_file($$test_base_out_dir/.qmake.cache, cont)|error()
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2017-11-23 20:20:32 +00:00
|
|
|
$${1}.literal_args += $$qtConfAllLibraryArgs($$eval($${1}.resolved_uses))
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# add possible command line args
|
2018-04-17 16:19:50 +00:00
|
|
|
qmake_args += \
|
|
|
|
$$qtConfPrepareArgs($$eval($${1}.args)) \
|
|
|
|
$$qtSystemQuote($$eval($${1}.literal_args))
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-07-15 13:57:43 +00:00
|
|
|
qtRunLoggedCommand("$$test_cmd_base $$qmake_args $$system_quote($$test_dir)") {
|
2016-06-11 20:49:01 +00:00
|
|
|
qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE"): \
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
2016-08-05 15:54:26 +00:00
|
|
|
defineTest(qtConfTest_files) {
|
|
|
|
for(i, $${1}.files._KEYS_) {
|
|
|
|
f = $$eval($${1}.files.$${i})
|
|
|
|
qtLog("Searching for file $${f}.")
|
2018-10-19 17:01:37 +00:00
|
|
|
contains(f, ".*\\.h") {
|
2016-08-05 15:54:26 +00:00
|
|
|
file = $$qtConfFindInPathList($$f, $$EXTRA_INCLUDEPATH $$QMAKE_DEFAULT_INCDIRS)
|
2018-10-19 17:01:37 +00:00
|
|
|
} else: contains(f, ".*\\.(lib|so|a)") {
|
2016-08-05 15:54:26 +00:00
|
|
|
file = $$qtConfFindInPathList($$f, $$EXTRA_LIBDIR $$QMAKE_DEFAULT_LIBDIRS)
|
|
|
|
} else {
|
|
|
|
# assume we're looking for an executable
|
2016-08-14 07:48:55 +00:00
|
|
|
file = $$qtConfFindInPath($$f, $$EXTRA_PATH)
|
2016-08-05 15:54:26 +00:00
|
|
|
}
|
|
|
|
isEmpty(file) {
|
|
|
|
qtLog(" Not found.");
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
qtLog(" Found at $${file}.")
|
|
|
|
}
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(logn) {
|
|
|
|
log("$${1}$$escape_expand(\\n)")
|
|
|
|
}
|
|
|
|
|
2016-08-15 12:40:52 +00:00
|
|
|
defineTest(qtLogTestIntro) {
|
2016-08-26 19:10:56 +00:00
|
|
|
label = $$eval($${1}.label)
|
|
|
|
isEmpty(label): return()
|
2016-08-15 12:40:52 +00:00
|
|
|
|
2017-12-05 18:58:50 +00:00
|
|
|
isEmpty(3): log("Checking for $${label}... ")
|
2016-08-15 12:40:52 +00:00
|
|
|
$$QMAKE_CONFIG_VERBOSE: log("$$escape_expand(\\n)")
|
2016-11-02 17:00:16 +00:00
|
|
|
write_file($$QMAKE_CONFIG_LOG, 2, append)
|
2016-08-15 12:40:52 +00:00
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtLogTestResult) {
|
2016-08-26 19:10:56 +00:00
|
|
|
isEmpty($${1}.label): return()
|
2016-08-15 12:40:52 +00:00
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
!isEmpty($${1}.log) {
|
|
|
|
field = $$eval($${1}.log)
|
|
|
|
log_msg = $$eval($${1}.$$field)
|
|
|
|
msg = "test $$1 gave result $$log_msg"
|
|
|
|
} else: $${2} {
|
|
|
|
log_msg = yes
|
|
|
|
msg = "test $$1 succeeded"
|
|
|
|
} else {
|
|
|
|
log_msg = no
|
|
|
|
msg = "test $$1 FAILED"
|
|
|
|
}
|
|
|
|
$$QMAKE_CONFIG_VERBOSE: log_msg = $$msg
|
2017-12-05 18:58:50 +00:00
|
|
|
isEmpty(3): logn("$$log_msg")
|
2016-06-11 20:49:01 +00:00
|
|
|
write_file($$QMAKE_CONFIG_LOG, msg, append)
|
|
|
|
}
|
|
|
|
|
2016-08-16 18:03:54 +00:00
|
|
|
defineTest(qtConfSaveResult) {
|
2016-08-24 11:39:15 +00:00
|
|
|
equals($${1}.cache, -): \
|
|
|
|
return()
|
2017-12-05 18:58:50 +00:00
|
|
|
keys = result msgs $$eval($${1}.cache)
|
2016-08-16 18:03:54 +00:00
|
|
|
cont = "cache.$${2}._KEYS_ = $$keys"
|
2017-12-05 17:37:36 +00:00
|
|
|
cache.$${2}._KEYS_ = $$keys
|
|
|
|
export(cache.$${2}._KEYS_)
|
|
|
|
for (k, keys) {
|
2016-08-16 18:03:54 +00:00
|
|
|
cont += "cache.$${2}.$${k} = $$val_escape($${1}.$${k})"
|
2017-12-05 17:37:36 +00:00
|
|
|
cache.$${2}.$${k} = $$eval($${1}.$${k})
|
|
|
|
export(cache.$${2}.$${k})
|
|
|
|
}
|
2016-08-16 18:03:54 +00:00
|
|
|
write_file($$QMAKE_CONFIG_CACHE, cont, append)|error()
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfLoadResult) {
|
|
|
|
equals(QMAKE_CONFIG_CACHE_USE, none): \
|
|
|
|
return(false)
|
|
|
|
isEmpty(cache.$${2}._KEYS_): \
|
|
|
|
return(false)
|
|
|
|
equals(QMAKE_CONFIG_CACHE_USE, positive):!$$eval(cache.$${2}.result): \
|
|
|
|
return(false)
|
|
|
|
for (k, cache.$${2}._KEYS_) {
|
|
|
|
$${1}.$${k} = $$eval(cache.$${2}.$${k})
|
|
|
|
export($${1}.$${k})
|
|
|
|
}
|
2017-12-05 18:58:50 +00:00
|
|
|
# we could print the cached result, but that's basically just noise -
|
|
|
|
# the explicitly generated summary is supposed to contain all relevant
|
|
|
|
# information.
|
|
|
|
qtLogTestIntro($$1, "loaded result for $$3 $$1", false)
|
|
|
|
qtLog($$eval($${1}.msgs))
|
|
|
|
qtLogTestResult($$1, $$eval($${1}.result), false)
|
2016-08-16 18:03:54 +00:00
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtConfIsBoolean) {
|
|
|
|
equals(1, "true")|equals(1, "false"): \
|
|
|
|
return(true)
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
2016-08-12 08:14:51 +00:00
|
|
|
defineTest(qtConfSetupTestTypeDeps) {
|
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
|
|
|
for (tt, $${currentConfig}.testTypeDependencies._KEYS_) {
|
2016-08-12 08:14:51 +00:00
|
|
|
!defined(qtConfTest_$${tt}, test): \
|
|
|
|
error("Declaring dependency for undefined test type '$$tt'.")
|
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
|
|
|
for (f, $${currentConfig}.testTypeDependencies.$${tt}._KEYS_) {
|
|
|
|
feature = $$eval($${currentConfig}.testTypeDependencies.$${tt}.$${f})
|
|
|
|
isEmpty($${currentConfig}.features.$${feature}._KEYS_): \
|
2016-08-12 08:14:51 +00:00
|
|
|
error("Test type '$$tt' depends on undefined feature '$$feature'.")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
# Test type aliasing means that one test type's callback is called by
|
|
|
|
# another test type's callback. Put differently, one callback forwards
|
|
|
|
# the call to another one. The former representation is more natural
|
|
|
|
# (and concise) to write, while the latter is more efficient to process.
|
|
|
|
# Hence, this function inverts the mapping.
|
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
|
|
|
for (tt, $${currentConfig}.testTypeAliases._KEYS_) {
|
2016-08-12 08:14:51 +00:00
|
|
|
!defined(qtConfTest_$${tt}, test): \
|
|
|
|
error("Aliasing undefined test type '$$tt'.")
|
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
|
|
|
for (tta, $${currentConfig}.testTypeAliases.$${tt}._KEYS_) {
|
|
|
|
type = $$eval($${currentConfig}.testTypeAliases.$${tt}.$${tta})
|
2016-08-12 08:14:51 +00:00
|
|
|
!defined(qtConfTest_$${type}, test): \
|
|
|
|
error("Aliasing '$$tt' to undefined test type '$$type'.")
|
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}.testTypeForwards.$${type} += $$tt
|
|
|
|
export($${currentConfig}.testTypeForwards.$${type})
|
2016-08-12 08:14:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-11 12:26:24 +00:00
|
|
|
defineTest(qtConfEnsureTestTypeDepsOne) {
|
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
|
|
|
depsn = $${currentConfig}.testTypeDependencies.$${1}._KEYS_
|
2016-08-12 08:14:51 +00:00
|
|
|
!isEmpty($$depsn) {
|
|
|
|
for (dep, $$depsn) {
|
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
|
|
|
feature = $$eval($${currentConfig}.testTypeDependencies.$${1}.$${dep})
|
2016-08-12 08:14:51 +00:00
|
|
|
!qtConfCheckFeature($$feature): \
|
|
|
|
error("Test type '$$1' depends on non-emitted feature $${feature}.")
|
|
|
|
}
|
|
|
|
$$depsn =
|
|
|
|
export($$depsn)
|
|
|
|
}
|
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
|
|
|
fwdsn = $${currentConfig}.testTypeForwards.$${1}
|
2016-08-12 08:14:51 +00:00
|
|
|
!isEmpty($$fwdsn) {
|
|
|
|
for (fwd, $$fwdsn): \
|
2018-10-11 12:26:24 +00:00
|
|
|
qtConfEnsureTestTypeDepsOne($$fwd)
|
2016-08-12 08:14:51 +00:00
|
|
|
$$fwdsn =
|
|
|
|
export($$fwdsn)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-11 12:26:24 +00:00
|
|
|
defineTest(qtConfEnsureTestTypeDeps) {
|
|
|
|
qtConfEnsureTestTypeDepsOne($$1)
|
|
|
|
currentConfig = config.builtins
|
|
|
|
qtConfEnsureTestTypeDepsOne($$1)
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtRunSingleTest) {
|
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
|
|
|
tpfx = $${currentConfig}.tests.$${1}
|
2016-06-11 20:49:01 +00:00
|
|
|
defined($${tpfx}.result, var): \
|
|
|
|
return()
|
|
|
|
|
|
|
|
type = $$eval($${tpfx}.type)
|
|
|
|
call = "qtConfTest_$$type"
|
|
|
|
!defined($$call, test): \
|
|
|
|
error("Configure test $${1} refers to nonexistent type $$type")
|
|
|
|
|
2016-08-12 08:14:51 +00:00
|
|
|
qtConfEnsureTestTypeDeps($$type)
|
|
|
|
|
2016-08-15 12:40:52 +00:00
|
|
|
preCall = "qtConfTestPrepare_$$type"
|
2016-08-24 12:02:58 +00:00
|
|
|
defined($$preCall, test):!$${preCall}($${tpfx}) {
|
|
|
|
$${tpfx}.result = false
|
|
|
|
export($${tpfx}.result)
|
|
|
|
# don't cache the result; the pre-deps have their own caches.
|
|
|
|
return()
|
|
|
|
}
|
|
|
|
|
|
|
|
# note: we do this only after resolving the dependencies and the
|
|
|
|
# preparation (which may resolve libraries), so that caching does
|
|
|
|
# not alter the execution order (and thus the output).
|
2017-12-05 18:58:50 +00:00
|
|
|
qtConfLoadResult($${tpfx}, $$1, "config test"): \
|
2016-08-24 12:02:58 +00:00
|
|
|
return()
|
2016-08-16 18:03:54 +00:00
|
|
|
|
2016-11-02 17:00:16 +00:00
|
|
|
qtLogTestIntro($${tpfx}, "executing config test $${1}")
|
2017-12-05 18:58:50 +00:00
|
|
|
qtPersistLog()
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-08-24 12:02:58 +00:00
|
|
|
result = false
|
|
|
|
$${call}($${tpfx}): result = true
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2017-12-05 18:58:50 +00:00
|
|
|
$${tpfx}.msgs = $$qtPersistedLog()
|
|
|
|
export($${tpfx}.msgs)
|
|
|
|
|
2016-08-24 12:02:58 +00:00
|
|
|
qtLogTestResult($${tpfx}, $$result)
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
$${tpfx}.result = $$result
|
|
|
|
export($${tpfx}.result)
|
2016-08-16 18:03:54 +00:00
|
|
|
qtConfSaveResult($${tpfx}, $$1)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
2016-11-11 08:09:12 +00:00
|
|
|
defineTest(qtConfHaveModule) {
|
|
|
|
module = $$replace(1, -, _)
|
|
|
|
!isEmpty(QT.$${module}.skip):$$eval(QT.$${module}.skip): \
|
|
|
|
return(false)
|
|
|
|
!isEmpty(QT.$${module}.name): \
|
|
|
|
return(true)
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineReplace(qtConfEvaluate) {
|
|
|
|
isEmpty(1): return(true)
|
|
|
|
|
2016-08-15 19:14:18 +00:00
|
|
|
1 ~= s/$$escape_expand(\\t)/ /g
|
|
|
|
1 ~= s/$$escape_expand(\\r)//g
|
2016-07-15 14:40:06 +00:00
|
|
|
1 ~= s/$$escape_expand(\\n) */ /g
|
2016-06-11 20:49:01 +00:00
|
|
|
expr = $${1}
|
|
|
|
expr ~= s/&&/ && /g
|
2018-10-19 17:01:37 +00:00
|
|
|
expr ~= s/\\|\\|/ || /g
|
2016-06-11 20:49:01 +00:00
|
|
|
expr ~= s/!/ ! /g
|
|
|
|
expr ~= s/\\(/ ( /g
|
|
|
|
expr ~= s/\\)/ ) /g
|
|
|
|
expr ~= s/ *== */==/g
|
|
|
|
expr ~= s/ *! = */!=/g
|
|
|
|
expr_list = $$eval($$list($$expr))
|
|
|
|
return($$qtConfEvaluateSubExpression($${1}, $$expr_list, 0))
|
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(qtConfEvaluateSingleExpression) {
|
|
|
|
e = $${2}
|
|
|
|
|
|
|
|
equals(e, true) {
|
|
|
|
result = true
|
|
|
|
} else: equals(e, false) {
|
|
|
|
result = false
|
|
|
|
} else: contains(e, "^[0-9]+$") {
|
|
|
|
# numbers
|
|
|
|
result = $$e
|
|
|
|
} else: contains(e, "^'.*'$") {
|
|
|
|
# quoted literals
|
|
|
|
result = $$replace(e, "^'(.*)'$", "\\1")
|
2018-10-19 17:01:37 +00:00
|
|
|
} else: contains(e, "^tests\\..*") {
|
2016-06-11 20:49:01 +00:00
|
|
|
!qt_conf_tests_allowed: \
|
|
|
|
error("Expression '$${1}' refers to a test, which is not allowed at this stage of configuring.")
|
|
|
|
test = $$section(e, ".", 1, 1)
|
|
|
|
var = $$section(e, ".", 2, -1)
|
|
|
|
isEmpty(var): \
|
|
|
|
var = result
|
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._KEYS_, $$test): \
|
2016-06-11 20:49:01 +00:00
|
|
|
error("Unknown test object $${test} in expression '$${1}'.")
|
|
|
|
qtRunSingleTest($$test)
|
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
|
|
|
result = $$eval($${currentConfig}.tests.$${test}.$${var})
|
2018-10-19 17:01:37 +00:00
|
|
|
} else: contains(e, "^libs\\..*") {
|
2016-08-15 12:40:52 +00:00
|
|
|
!qt_conf_tests_allowed: \
|
|
|
|
error("Expression '$${1}' refers to a library, which is not allowed at this stage of configuring.")
|
|
|
|
lib = $$section(e, ".", 1, 1)
|
|
|
|
var = $$section(e, ".", 2, -1)
|
|
|
|
isEmpty(var): \
|
|
|
|
var = result
|
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}.libraries._KEYS_, $$lib): \
|
2016-08-15 12:40:52 +00:00
|
|
|
error("Unknown library object $${lib} in expression '$${1}'.")
|
|
|
|
qtConfHandleLibrary($$lib)
|
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
|
|
|
!defined($${currentConfig}.libraries.$${lib}.$${var}, var): \
|
2016-10-11 13:13:03 +00:00
|
|
|
var = sources.$$eval($${currentConfig}.libraries.$${lib}.source).$$var
|
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
|
|
|
result = $$eval($${currentConfig}.libraries.$${lib}.$${var})
|
2018-10-19 17:01:37 +00:00
|
|
|
} else: contains(e, "^features\\..*") {
|
2016-06-11 20:49:01 +00:00
|
|
|
feature = $$section(e, ".", 1, 1)
|
|
|
|
var = $$section(e, ".", 2, -1)
|
|
|
|
isEmpty(var): \
|
|
|
|
var = available
|
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}.features._KEYS_, $$feature) {
|
|
|
|
# this is basically a copy of what qtConfig() in qt_build_config.prf
|
|
|
|
# does, but we produce a nicer error message.
|
|
|
|
for (module, QMAKE_CONFIG_DEPS) {
|
|
|
|
contains(QT.$${module}.enabled_features, $$feature): \
|
|
|
|
result = true
|
|
|
|
else: contains(QT.$${module}.disabled_features, $$feature): \
|
|
|
|
result = false
|
|
|
|
else: \
|
|
|
|
next()
|
|
|
|
!equals(var, available): \
|
|
|
|
error("Expression '$$1' is accessing field '$$var' of non-local feature $${feature}.")
|
|
|
|
return($$result)
|
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
error("Unknown feature object $${feature} in expression '$${1}'.")
|
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
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
!qtConfCheckFeature($$feature): \
|
|
|
|
error("Expression '$$1' is accessing non-emitted feature $${feature}.")
|
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
|
|
|
result = $$eval($${currentConfig}.features.$${feature}.$${var})
|
2018-10-19 17:01:37 +00:00
|
|
|
} else: contains(e, "^config\\..*") {
|
|
|
|
var = $$replace(e, "^config\\.", "")
|
2016-06-11 20:49:01 +00:00
|
|
|
result = false
|
|
|
|
contains(CONFIG, $$var): result = true
|
2018-10-19 17:01:37 +00:00
|
|
|
} else: contains(e, "^module\\..*") {
|
|
|
|
var = $$replace(e, "^module\\.", "")
|
2016-11-11 08:09:12 +00:00
|
|
|
result = false
|
|
|
|
qtConfHaveModule($$var): result = true
|
2018-10-19 17:01:37 +00:00
|
|
|
} else: contains(e, "^arch\\..*") {
|
|
|
|
var = $$replace(e, "^arch\\.", "")
|
2016-06-11 20:49:01 +00:00
|
|
|
result = false
|
2016-08-12 08:14:51 +00:00
|
|
|
isEmpty(QT_ARCH): \
|
|
|
|
qtConfCheckFeature(architecture)
|
2016-06-11 20:49:01 +00:00
|
|
|
contains(QT_ARCH, $$var): result = true
|
2018-10-19 17:01:37 +00:00
|
|
|
} else: contains(e, "^subarch\\..*") {
|
|
|
|
var = $$replace(e, "^subarch\\.", "")
|
2018-02-20 11:33:23 +00:00
|
|
|
result = false
|
|
|
|
isEmpty(QT_ARCH): \
|
|
|
|
qtConfCheckFeature(architecture)
|
|
|
|
contains(QT_CPU_FEATURES.$$QT_ARCH, $$var): result = true
|
2018-10-19 17:01:37 +00:00
|
|
|
} else: contains(e, "^input\\..*") {
|
2016-06-11 20:49:01 +00:00
|
|
|
result = $$eval(config.$$e)
|
2018-10-19 17:01:37 +00:00
|
|
|
} else: contains(e, "^var\\..*") {
|
|
|
|
var = $$replace(e, "^var\\.", "")
|
2016-06-11 20:49:01 +00:00
|
|
|
result = $$eval($$var)
|
2018-10-19 17:01:37 +00:00
|
|
|
} else: contains(e, "^call\\..*") {
|
|
|
|
call = $$replace(e, "^call\\.", "qtConfFunc_")
|
2016-06-11 20:49:01 +00:00
|
|
|
!defined($$call, replace): \
|
|
|
|
error("Call $$call referenced in expression '$${1}' does not exist")
|
|
|
|
eval(result = \$\$"$$call"())
|
|
|
|
} else {
|
|
|
|
error("Unrecognized token $$e in expression '$${1}'")
|
|
|
|
}
|
|
|
|
return($$result)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(qtConfEvaluateSubExpression) {
|
|
|
|
expr_list = $${2}
|
|
|
|
result = true
|
|
|
|
negate = false
|
|
|
|
runSubExpression = false
|
|
|
|
nesting_level = 0
|
|
|
|
for (n, $${3}..$$num_add($$size(expr_list), -1)) {
|
|
|
|
e = $$member(expr_list, $$n)
|
|
|
|
$$runSubExpression {
|
|
|
|
runSubExpression = false
|
|
|
|
result = $$qtConfEvaluateSubExpression($${1}, $$expr_list, $$n)
|
|
|
|
} else: isEqual(e, "(") {
|
|
|
|
isEqual(nesting_level, 0): runSubExpression = true
|
|
|
|
nesting_level = $$num_add($$nesting_level, 1)
|
|
|
|
next()
|
|
|
|
} else: isEqual(e, ")") {
|
|
|
|
nesting_level = $$num_add($$nesting_level, -1)
|
|
|
|
lessThan(nesting_level, 0): break()
|
|
|
|
next()
|
|
|
|
} else: greaterThan(nesting_level, 0) {
|
|
|
|
next()
|
|
|
|
} else: isEqual(e, "!") {
|
|
|
|
negate = true
|
|
|
|
next()
|
|
|
|
} else: isEqual(e, "&&") {
|
|
|
|
!qtConfIsBoolean($$result): \
|
|
|
|
error("Left hand side of && is non-boolean value '$$result' in expression '$${1}'")
|
|
|
|
!$$result: return(false)
|
|
|
|
} else: isEqual(e, "||") {
|
|
|
|
!qtConfIsBoolean($$result): \
|
|
|
|
error("Left hand side of || is non-boolean value '$$result' in expression '$${1}'")
|
|
|
|
$$result: return(true)
|
|
|
|
} else {
|
|
|
|
contains(e, ".*==.*") {
|
|
|
|
lhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, "==.*", ""))
|
|
|
|
rhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, ".*==", ""))
|
|
|
|
result = false
|
|
|
|
equals(lhs, $$rhs): result = true
|
|
|
|
} else: contains(e, ".*!=.*") {
|
|
|
|
lhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, "!=.*", ""))
|
|
|
|
rhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, ".*!=", ""))
|
|
|
|
result = false
|
|
|
|
!equals(lhs, $$rhs): result = true
|
|
|
|
} else {
|
|
|
|
result = $$qtConfEvaluateSingleExpression($${1}, $$e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$$negate {
|
|
|
|
!qtConfIsBoolean($$result): \
|
|
|
|
error("Attempting to negate a non-boolean value '$$result' in expression '$${1}'")
|
|
|
|
$$result: \
|
|
|
|
result = false
|
|
|
|
else: \
|
|
|
|
result = true
|
|
|
|
negate = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return($$result)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(qtIsFeatureEnabled) {
|
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
|
|
|
enable = $$eval($${currentConfig}.features.$${1}.enable)
|
2016-06-11 20:49:01 +00:00
|
|
|
!isEmpty(enable) {
|
|
|
|
$$qtConfEvaluate($$enable): \
|
|
|
|
return(true)
|
|
|
|
} else {
|
|
|
|
equals(config.input.$${1}, "yes"): \
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(qtIsFeatureDisabled) {
|
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
|
|
|
disable = $$eval($${currentConfig}.features.$${1}.disable)
|
2016-06-11 20:49:01 +00:00
|
|
|
!isEmpty(disable) {
|
|
|
|
$$qtConfEvaluate($$disable): \
|
|
|
|
return(true)
|
|
|
|
} else {
|
|
|
|
equals(config.input.$${1}, "no"): \
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(qtConfCheckSingleCondition) {
|
|
|
|
result = $$qtConfEvaluate($$2)
|
|
|
|
|
|
|
|
!qtConfIsBoolean($$result): \
|
|
|
|
error("Evaluation of condition '$$2' yielded non-boolean value '$$result' in feature '$${1}'.")
|
|
|
|
|
|
|
|
!$$result {
|
|
|
|
$${3} {
|
2016-07-14 14:41:09 +00:00
|
|
|
qtConfAddError("Feature '$${1}' was enabled, but the pre-condition '$$2' failed.", log)
|
2016-06-11 20:49:01 +00:00
|
|
|
$$result = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return($$result)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfCheckFeature) {
|
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
|
|
|
fpfx = $${currentConfig}.features.$${1}
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
available = $$eval($${fpfx}.available)
|
|
|
|
!isEmpty(available): return(true)
|
|
|
|
|
|
|
|
# skip features that will not get emitted anyway
|
|
|
|
emitIf = $$qtConfEvaluate($$eval($${fpfx}.emitIf))
|
|
|
|
enabled = $$qtIsFeatureEnabled($$1)
|
|
|
|
disabled = $$qtIsFeatureDisabled($$1)
|
|
|
|
|
|
|
|
!$$emitIf {
|
|
|
|
$$enabled|$$disabled: \
|
|
|
|
qtConfAddWarning("Feature $${1} is insignificant in this configuration, ignoring related command line option(s).")
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
$$disabled {
|
|
|
|
result = false
|
|
|
|
} else: !$$enabled:!$$qtConfEvaluate($$eval($${fpfx}.autoDetect)) {
|
|
|
|
# feature not auto-detected and not explicitly enabled
|
|
|
|
result = false
|
|
|
|
} else {
|
2017-07-28 15:42:27 +00:00
|
|
|
result = true
|
|
|
|
for (condition, $$qtConfScalarOrList($${fpfx}.condition)) {
|
2016-06-11 20:49:01 +00:00
|
|
|
result = $$qtConfCheckSingleCondition($$1, $$condition, $$enabled)
|
2017-07-28 15:42:27 +00:00
|
|
|
!$$result: break()
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
$${fpfx}.available = $$result
|
|
|
|
export($${fpfx}.available)
|
|
|
|
|
2016-11-02 14:15:19 +00:00
|
|
|
for (i, $${fpfx}.output._KEYS_): \
|
|
|
|
qtConfProcessOneOutput($${1}, $$i)
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
2016-11-11 08:09:12 +00:00
|
|
|
defineTest(qtConfCheckModuleCondition) {
|
|
|
|
QT.$${currentModule}.skip = false
|
|
|
|
!$$qtConfEvaluate($$eval($${currentConfig}.condition)): \
|
|
|
|
QT.$${currentModule}.skip = true
|
|
|
|
export(QT.$${currentModule}.skip)
|
|
|
|
|
|
|
|
# ensure qtConfHaveModule() works
|
|
|
|
QT.$${currentModule}.name = -
|
|
|
|
export(QT.$${currentModule}.name)
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
defineTest(qtConfProcessFeatures) {
|
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
|
|
|
for (feature, $${currentConfig}.features._KEYS_): \
|
2016-08-12 08:14:51 +00:00
|
|
|
qtConfCheckFeature($$feature)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# reporting
|
|
|
|
#
|
|
|
|
|
2017-02-08 17:46:21 +00:00
|
|
|
defineReplace(qtConfPadCols) {
|
|
|
|
pad = $$num_add($$str_size($$2), -$$str_size($${1}))
|
2016-06-11 20:49:01 +00:00
|
|
|
lessThan(pad, 0): pad = 0
|
2017-02-08 17:46:21 +00:00
|
|
|
return("$$1 $$str_member($$2, 0, $$pad) $$3")
|
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2017-02-08 17:46:21 +00:00
|
|
|
defineTest(qtConfReportPadded) {
|
|
|
|
qtConfAddReport($$qtConfPadCols($$1, "........................................", $$2))
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(qtConfCollectFeatures) {
|
|
|
|
l =
|
|
|
|
for (feature, $$list($${1})) {
|
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
|
|
|
$$eval($${currentConfig}.features.$${feature}.available): \
|
2016-08-26 19:10:56 +00:00
|
|
|
l += $$eval($${currentConfig}.features.$${feature}.label)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
isEmpty(l): return("<none>")
|
|
|
|
return($$join(l, ' '))
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfReport_featureList) {
|
|
|
|
qtConfReportPadded($${1}, $$qtConfCollectFeatures($${2}))
|
|
|
|
}
|
|
|
|
|
|
|
|
defineReplace(qtConfFindFirstAvailableFeature) {
|
|
|
|
for (feature, $$list($${1})) {
|
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
|
|
|
isEmpty($${currentConfig}.features.$${feature}._KEYS_): \
|
2016-06-11 20:49:01 +00:00
|
|
|
error("Asking for a report on undefined feature $${2}.")
|
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
|
|
|
$$eval($${currentConfig}.features.$${feature}.available): \
|
2016-08-26 19:10:56 +00:00
|
|
|
return($$eval($${currentConfig}.features.$${feature}.label))
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return("<none>")
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfReport_firstAvailableFeature) {
|
|
|
|
qtConfReportPadded($${1}, $$qtConfFindFirstAvailableFeature($${2}))
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfReport_feature) {
|
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}.features._KEYS_, $$2): \
|
2016-06-11 20:49:01 +00:00
|
|
|
error("Asking for a report on undefined feature $${2}.")
|
|
|
|
|
|
|
|
# hide report for not emitted features
|
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
|
|
|
isEmpty($${currentConfig}.features.$${2}.available): \
|
2016-06-11 20:49:01 +00:00
|
|
|
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
|
|
|
$$eval($${currentConfig}.features.$${2}.available) {
|
2016-06-11 20:49:01 +00:00
|
|
|
result = "yes"
|
|
|
|
!isEmpty(3): result = "$${3}"
|
|
|
|
} else {
|
|
|
|
result = "no"
|
|
|
|
!isEmpty(4): result = "$${4}"
|
|
|
|
}
|
|
|
|
|
2016-08-26 19:10:56 +00:00
|
|
|
text = $$eval($${currentConfig}.features.$${2}.label)
|
2016-07-14 15:40:41 +00:00
|
|
|
|
|
|
|
qtConfReportPadded($${1}$$text, $$result)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfReport_note) {
|
|
|
|
qtConfAddNote($${1})
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfReport_warning) {
|
|
|
|
qtConfAddWarning($${1})
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfReport_error) {
|
2016-07-14 14:41:09 +00:00
|
|
|
qtConfAddError($${1}, log)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
2016-11-18 17:17:49 +00:00
|
|
|
defineTest(qtConfReport_fatal) {
|
|
|
|
qtConfFatalError($${1})
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtConfCreateReportRecurse) {
|
|
|
|
equals(2, false) {
|
|
|
|
indent = ""
|
|
|
|
recurse = false
|
|
|
|
} else {
|
|
|
|
indent = $${2}
|
|
|
|
recurse = true
|
|
|
|
}
|
|
|
|
|
|
|
|
keys = $$eval($${1}._KEYS_)
|
|
|
|
for (n, keys) {
|
|
|
|
entry = $${1}.$$n
|
|
|
|
subKeys = $$eval($${entry}._KEYS_)
|
|
|
|
contains(subKeys, condition) {
|
|
|
|
condition = $$eval($${entry}.condition)
|
|
|
|
r = $$qtConfEvaluate($$condition)
|
|
|
|
!qtConfIsBoolean($$r): \
|
|
|
|
error("Evaluation of condition '$$condition' in report entry $${entry} yielded non-boolean value '$$r'.")
|
|
|
|
!$$r: next()
|
|
|
|
}
|
|
|
|
contains(subKeys, "section") {
|
|
|
|
!$$recurse: \
|
|
|
|
error("Report type 'section' is not allowed in '$$1'.")
|
|
|
|
section = $$eval($${entry}.section)
|
|
|
|
qtConfAddReport("$$indent$$section:")
|
|
|
|
qtConfCreateReportRecurse("$${entry}.entries", "$$indent ")
|
|
|
|
} else: !isEmpty($${entry}) {
|
|
|
|
feature = $$eval($${entry})
|
2016-07-14 15:40:41 +00:00
|
|
|
qtConfReport_feature($$indent, $$feature)
|
2016-06-11 20:49:01 +00:00
|
|
|
} else {
|
|
|
|
text = $$eval($${entry}.message)
|
|
|
|
isEmpty($${entry}.type): \
|
|
|
|
error("Report entry $${entry} doesn't define a type.")
|
|
|
|
r = "qtConfReport_$$eval($${entry}.type)"
|
|
|
|
!defined($$r, test): \
|
|
|
|
error("Undefined report type $$eval($${entry}.type) used in report entry $${entry}.")
|
|
|
|
args = $$eval($${entry}.args)
|
|
|
|
$${r}($$indent$${text}, $$args)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfProcessEarlyChecks) {
|
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
|
|
|
qtConfCreateReportRecurse($${currentConfig}.earlyReport, false)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfCreateReport) {
|
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
|
|
|
qtConfCreateReportRecurse($${currentConfig}.report, false)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfCreateSummary) {
|
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
|
|
|
qtConfCreateReportRecurse($${currentConfig}.summary, "")
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfPrintReport) {
|
2016-12-23 20:11:40 +00:00
|
|
|
blocks = \
|
|
|
|
"$$join(QT_CONFIGURE_REPORT, $$escape_expand(\\n))" \
|
|
|
|
"$$join(QT_CONFIGURE_NOTES, $$escape_expand(\\n\\n))" \
|
|
|
|
"$$join(QT_CONFIGURE_WARNINGS, $$escape_expand(\\n\\n))"
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
!isEmpty(QT_CONFIGURE_ERRORS) {
|
2016-12-23 20:11:40 +00:00
|
|
|
blocks += "$$join(QT_CONFIGURE_ERRORS, $$escape_expand(\\n\\n))"
|
|
|
|
mention_config_log:!$$QMAKE_CONFIG_VERBOSE: \
|
|
|
|
blocks += "Check config.log for details."
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
2016-12-23 20:11:40 +00:00
|
|
|
blocks = "$$join(blocks, $$escape_expand(\\n\\n))"
|
|
|
|
logn($$blocks)
|
|
|
|
!isEmpty(QT_CONFIGURE_ERRORS):!equals(config.input.continue, yes): \
|
|
|
|
error()
|
|
|
|
write_file($$OUT_PWD/config.summary, blocks)|error()
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfCheckErrors) {
|
|
|
|
!isEmpty(QT_CONFIGURE_ERRORS):!equals(config.input.continue, yes): \
|
|
|
|
qtConfPrintReport()
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# output generation
|
|
|
|
#
|
|
|
|
|
2018-10-11 12:26:24 +00:00
|
|
|
defineTest(qtConfOutput_libraryPaths) {
|
|
|
|
qtLog("Global lib dirs: [$$val_escape(EXTRA_LIBDIR)] [$$val_escape(QMAKE_DEFAULT_LIBDIRS)]")
|
|
|
|
qtLog("Global inc dirs: [$$val_escape(EXTRA_INCLUDEPATH)] [$$val_escape(QMAKE_DEFAULT_INCDIRS)]")
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# qtConfOutputVar(modifier, output, name, value)
|
|
|
|
defineTest(qtConfOutputVar) {
|
|
|
|
modifier = $$1
|
|
|
|
output = $$2
|
|
|
|
name = $$3
|
|
|
|
value = $$val_escape(4)
|
|
|
|
|
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
|
|
|
defined($${currentConfig}.output.$${output}.assign.$${name}, var): \
|
2016-06-11 20:49:01 +00:00
|
|
|
error("Trying to overwrite assigned variable '$$name' in '$$output' using modifier '$$modifier'.")
|
|
|
|
|
|
|
|
equals(modifier, assign) {
|
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
|
|
|
!isEmpty($${currentConfig}.output.$${output}.append.$${name})|!isEmpty($${currentConfig}.output.$${output}.remove.$${name}): \
|
2016-06-11 20:49:01 +00:00
|
|
|
error("Trying to assign variable '$$name' in '$$output', which has already appended or removed parts.")
|
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.$${output}.assign.$${name} = $$value
|
2016-06-11 20:49:01 +00:00
|
|
|
} else: equals(modifier, append) {
|
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}.output.$${output}.remove.$${name}, $$value): \
|
2016-06-11 20:49:01 +00:00
|
|
|
error("Trying to append removed '$$value' to variable '$$name' in '$$output'.")
|
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.$${output}.append.$${name} += $$value
|
2016-06-11 20:49:01 +00:00
|
|
|
} else: equals(modifier, remove) {
|
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}.output.$${output}.append.$${name}, $$value): \
|
2016-06-11 20:49:01 +00:00
|
|
|
error("Trying to remove appended '$$value' to variable '$$name' in '$$output'.")
|
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.$${output}.remove.$${name} += $$value
|
2016-06-11 20:49:01 +00:00
|
|
|
} else {
|
|
|
|
error("Invalid modifier '$$modifier' passed to qtConfOutputVar.")
|
|
|
|
}
|
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.$${output}.$${modifier}._KEYS_ *= $${name}
|
|
|
|
export($${currentConfig}.output.$${output}.$${modifier}.$${name})
|
|
|
|
export($${currentConfig}.output.$${output}.$${modifier}._KEYS_)
|
|
|
|
}
|
|
|
|
|
|
|
|
# qtConfExtendVar(output, name, value)
|
|
|
|
defineTest(qtConfExtendVar) {
|
|
|
|
output = $$1
|
|
|
|
name = $$2
|
|
|
|
value = $$val_escape(3)
|
|
|
|
|
|
|
|
!defined($${currentConfig}.output.$${output}.assign.$${name}, var): \
|
|
|
|
error("Trying to extend undefined variable '$$name' in '$$output'.")
|
|
|
|
|
|
|
|
$${currentConfig}.output.$${output}.assign.$${name} += $$value
|
|
|
|
export($${currentConfig}.output.$${output}.assign.$${name})
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutputVarHelper) {
|
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
|
|
|
!isEmpty($${2}.public):$$eval($${2}.public) {
|
|
|
|
output = "publicPro"
|
|
|
|
} else {
|
|
|
|
output = "privatePro"
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
negative = $$eval($${2}.negative)
|
|
|
|
isEmpty(negative): negative = false
|
2016-08-26 16:38:39 +00:00
|
|
|
equals(3, $$negative): return()
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
name = $$eval($${2}.name)
|
|
|
|
isEmpty(name): \
|
|
|
|
error("Output type 'var$$title($$1)' used in feature '$$eval($${2}.feature)' without a 'name' entry.")
|
|
|
|
|
|
|
|
value = $$qtConfEvaluate($$eval($${2}.value))
|
2016-07-15 18:43:44 +00:00
|
|
|
!isEmpty($${2}.eval):$$qtConfEvaluate($$eval($${2}.eval)): \
|
|
|
|
eval(value = $$value)
|
2016-06-11 20:49:01 +00:00
|
|
|
qtConfOutputVar($$1, $$output, $$name, $$value)
|
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
|
|
|
equals(output, "publicPro"):!isEmpty($${currentConfig}.module): \
|
|
|
|
qtConfExtendVar($$output, "QT.$${currentModule}.exports", $$name)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_varAssign) {
|
|
|
|
qtConfOutputVarHelper(assign, $$1, $$2)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_varAppend) {
|
|
|
|
qtConfOutputVarHelper(append, $$1, $$2)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_varRemove) {
|
|
|
|
qtConfOutputVarHelper(remove, $$1, $$2)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutputConfigVar) {
|
|
|
|
pro = $$3
|
|
|
|
var = $$4
|
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
|
|
|
modular = $$5
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
negative = $$eval($${1}.negative)
|
|
|
|
isEmpty(negative): negative = false
|
2016-08-26 16:38:39 +00:00
|
|
|
equals(2, $$negative): return()
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
val = $$eval($${1}.name)
|
|
|
|
isEmpty(val) {
|
|
|
|
val = $$eval($${1}.feature)
|
|
|
|
$$negative: val = no-$$val
|
|
|
|
}
|
|
|
|
|
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
|
|
|
isEmpty($${currentConfig}.module)|!$$modular: \
|
|
|
|
qtConfOutputVar(append, $$pro, $$var, $$val)
|
|
|
|
else: \
|
|
|
|
qtConfExtendVar($$pro, "QT.$${currentModule}.$$var", $$val)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_publicQtConfig) {
|
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
|
|
|
qtConfOutputConfigVar($$1, $$2, "publicPro", "QT_CONFIG", true)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_publicConfig) {
|
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
|
|
|
!isEmpty($${currentConfig}.module): \
|
|
|
|
error("Cannot use output type 'publicConfig' in module-local feature '$$eval($${1}.feature)'.")
|
|
|
|
qtConfOutputConfigVar($$1, $$2, "publicPro", "CONFIG", false)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_privateConfig) {
|
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
|
|
|
qtConfOutputConfigVar($$1, $$2, "privatePro", "CONFIG", false)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutputSetDefine) {
|
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.$${1}.$${2} = $${3}
|
|
|
|
$${currentConfig}.output.$${1}._KEYS_ *= $${2}
|
|
|
|
export($${currentConfig}.output.$${1}.$${2})
|
|
|
|
export($${currentConfig}.output.$${1}._KEYS_)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_define) {
|
|
|
|
output = publicHeader
|
|
|
|
define = $$eval($${1}.name)
|
|
|
|
value = $$qtConfEvaluate($$eval($${1}.value))
|
|
|
|
isEmpty(define): \
|
|
|
|
error("Output type 'define' used in feature '$$eval($${1}.feature)' without a 'name' entry.")
|
|
|
|
|
|
|
|
negative = $$eval($${1}.negative)
|
|
|
|
isEmpty(negative): negative = false
|
2016-08-26 16:38:39 +00:00
|
|
|
equals(2, $$negative): return()
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-08-26 16:38:39 +00:00
|
|
|
qtConfOutputSetDefine($$output, $$define, $$value)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfOutput_feature) {
|
|
|
|
name = "$$eval($${1}.name)"
|
|
|
|
isEmpty(name): \
|
|
|
|
name = $$eval($${1}.feature)
|
|
|
|
|
|
|
|
$${2} {
|
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
|
|
|
isEmpty($${currentConfig}.module): \
|
|
|
|
qtConfOutputVar(append, "publicPro", "QT_CONFIG", $$name)
|
|
|
|
else: \
|
|
|
|
qtConfExtendVar("publicPro", "QT.$${currentModule}.QT_CONFIG", $$name)
|
2016-06-11 20:49:01 +00:00
|
|
|
} else {
|
|
|
|
f = $$upper($$replace(name, -, _))
|
|
|
|
qtConfOutputSetDefine("publicHeader", "QT_NO_$$f")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
|
|
defineTest(qtConfSetModuleName) {
|
|
|
|
currentModule = $$eval($${currentConfig}.module)
|
|
|
|
isEmpty(currentModule): \
|
|
|
|
currentModule = global
|
|
|
|
export(currentModule)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfSetupModuleOutputs) {
|
|
|
|
qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.enabled_features", )
|
|
|
|
qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.disabled_features", )
|
|
|
|
qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.enabled_features", )
|
|
|
|
qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.disabled_features", )
|
|
|
|
!isEmpty($${currentConfig}.module) {
|
|
|
|
qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.QT_CONFIG", )
|
|
|
|
qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.exports", )
|
|
|
|
qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.libraries", )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-18 20:24:26 +00:00
|
|
|
defineTest(qtConfOutput_publicFeature) {
|
|
|
|
name = "$$eval($${1}.name)"
|
|
|
|
isEmpty(name): \
|
|
|
|
name = $$eval($${1}.feature)
|
|
|
|
feature = $$replace(name, [-+.], _)
|
|
|
|
|
|
|
|
$${2} {
|
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
|
|
|
qtConfExtendVar("publicPro", "QT.$${currentModule}.enabled_features", $$name)
|
|
|
|
QT.$${currentModule}.enabled_features += $$name
|
|
|
|
export(QT.$${currentModule}.enabled_features)
|
2016-08-18 20:24:26 +00:00
|
|
|
qtConfOutputSetDefine("publicHeader", "QT_FEATURE_$$feature", 1)
|
|
|
|
} 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
|
|
|
qtConfExtendVar("publicPro", "QT.$${currentModule}.disabled_features", $$name)
|
|
|
|
QT.$${currentModule}.disabled_features += $$name
|
|
|
|
export(QT.$${currentModule}.disabled_features)
|
2016-08-18 20:24:26 +00:00
|
|
|
qtConfOutputSetDefine("publicHeader", "QT_FEATURE_$$feature", -1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
defineTest(qtConfOutput_privateFeature) {
|
|
|
|
name = "$$eval($${1}.name)"
|
|
|
|
isEmpty(name): \
|
|
|
|
name = $$eval($${1}.feature)
|
2016-08-18 20:25:08 +00:00
|
|
|
feature = $$replace(name, [-+.], _)
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
$${2} {
|
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
|
|
|
qtConfExtendVar("privatePro", "QT.$${currentModule}_private.enabled_features", $$name)
|
|
|
|
QT.$${currentModule}_private.enabled_features += $$name
|
|
|
|
export(QT.$${currentModule}_private.enabled_features)
|
2016-08-18 20:25:08 +00:00
|
|
|
qtConfOutputSetDefine("privateHeader", "QT_FEATURE_$$feature", 1)
|
2016-06-11 20:49:01 +00:00
|
|
|
} 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
|
|
|
qtConfExtendVar("privatePro", "QT.$${currentModule}_private.disabled_features", $$name)
|
|
|
|
QT.$${currentModule}_private.disabled_features += $$name
|
|
|
|
export(QT.$${currentModule}_private.disabled_features)
|
2016-08-18 20:25:08 +00:00
|
|
|
qtConfOutputSetDefine("privateHeader", "QT_FEATURE_$$feature", -1)
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfProcessOneOutput) {
|
|
|
|
feature = $${1}
|
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
|
|
|
fpfx = $${currentConfig}.features.$${feature}
|
2016-06-11 20:49:01 +00:00
|
|
|
opfx = $${fpfx}.output.$${2}
|
|
|
|
|
|
|
|
call = $$eval($${opfx}.type)
|
|
|
|
isEmpty(call) {
|
|
|
|
# output is just a string, not an object
|
|
|
|
call = $$eval($$opfx)
|
|
|
|
}
|
|
|
|
!defined("qtConfOutput_$$call", test): \
|
|
|
|
error("Undefined type '$$call' in output '$$2' of feature '$$feature'.")
|
|
|
|
|
2017-02-10 12:01:08 +00:00
|
|
|
!$$qtConfEvaluate($$eval($${opfx}.condition)): \
|
|
|
|
return()
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-08-04 17:05:09 +00:00
|
|
|
$${opfx}.feature = $$feature
|
2016-06-11 20:49:01 +00:00
|
|
|
qtConfOutput_$${call}($$opfx, $$eval($${fpfx}.available))
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtConfProcessOutput) {
|
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}._KEYS_, "features"): \
|
|
|
|
return()
|
|
|
|
|
|
|
|
basedir = $$shadowed($$eval($${currentConfig}.dir))
|
|
|
|
module = $$eval($${currentConfig}.module)
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# write it to the output files
|
2016-11-23 17:41:48 +00:00
|
|
|
!defined($${currentConfig}.files._KEYS_, var) {
|
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
|
|
|
# set defaults that should work for most Qt modules
|
|
|
|
isEmpty(module): \
|
|
|
|
error("Neither module nor files section specified in configuration file.")
|
|
|
|
|
|
|
|
$${currentConfig}.files._KEYS_ = publicPro privatePro publicHeader privateHeader
|
|
|
|
$${currentConfig}.files.publicPro = qt$${module}-config.pri
|
|
|
|
$${currentConfig}.files.privatePro = qt$${module}-config.pri # sic!
|
|
|
|
$${currentConfig}.files.publicHeader = qt$${module}-config.h
|
|
|
|
$${currentConfig}.files.privateHeader = qt$${module}-config_p.h
|
|
|
|
}
|
|
|
|
|
|
|
|
for (type, $${currentConfig}.files._KEYS_) {
|
2016-06-11 20:49:01 +00:00
|
|
|
contains(type, ".*Pro") {
|
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
|
|
|
for (k, $${currentConfig}.output.$${type}.assign._KEYS_): \
|
|
|
|
$${currentConfig}.output.$$type += "$$k = $$eval($${currentConfig}.output.$${type}.assign.$$k)"
|
|
|
|
for (k, $${currentConfig}.output.$${type}.remove._KEYS_): \
|
|
|
|
$${currentConfig}.output.$$type += "$$k -= $$eval($${currentConfig}.output.$${type}.remove.$$k)"
|
|
|
|
for (k, $${currentConfig}.output.$${type}.append._KEYS_): \
|
|
|
|
$${currentConfig}.output.$$type += "$$k += $$eval($${currentConfig}.output.$${type}.append.$$k)"
|
2016-11-24 17:41:48 +00:00
|
|
|
} else: contains(type, ".*Header") {
|
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
|
|
|
for (define, $${currentConfig}.output.$${type}._KEYS_) {
|
|
|
|
value = $$eval($${currentConfig}.output.$${type}.$${define})
|
|
|
|
$${currentConfig}.output.$$type += "$${LITERAL_HASH}define $$define $$value"
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-08 17:50:54 +00:00
|
|
|
content = $$eval($${currentConfig}.output.$${type})
|
|
|
|
|
|
|
|
!isEmpty(module): \
|
|
|
|
call = qtConfOutputPostProcess_$${module}_$${type}
|
|
|
|
else: \
|
|
|
|
call = qtConfOutputPostProcess_$${type}
|
|
|
|
defined($$call, replace): \
|
|
|
|
eval(content = \$\$"$$call"(\$\$content))
|
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
|
|
|
|
|
|
|
file = $$eval($${currentConfig}.files.$${type})
|
2016-11-08 17:50:54 +00:00
|
|
|
fileCont.$$file += $$content
|
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
|
|
|
fileCont._KEYS_ *= $$file
|
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
|
|
|
|
|
|
|
for (file, fileCont._KEYS_): \
|
|
|
|
write_file($$basedir/$$file, fileCont.$$file)|error()
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# tie it all together
|
|
|
|
#
|
|
|
|
|
2017-01-03 18:47:03 +00:00
|
|
|
!isEmpty(_QMAKE_SUPER_CACHE_):!equals(OUT_PWD, $$dirname(_QMAKE_SUPER_CACHE_)) {
|
|
|
|
# sub-repo within a top-level build; no need to configure anything.
|
2017-01-03 19:23:19 +00:00
|
|
|
!isEmpty(QMAKE_EXTRA_ARGS) {
|
|
|
|
# sub-projects don't get the extra args passed down automatically,
|
|
|
|
# so we can use their presence to detect misguided attempts to
|
|
|
|
# configure the repositories separately.
|
|
|
|
# caveat: a plain qmake call is indistinguishable from a recursion
|
|
|
|
# (by design), so we cannot detect this case.
|
|
|
|
error("You cannot configure $$TARGET separately within a top-level build.")
|
|
|
|
}
|
2017-01-03 18:47:03 +00:00
|
|
|
return()
|
|
|
|
}
|
|
|
|
|
2017-01-03 18:51:52 +00:00
|
|
|
config.$${TARGET}.dir = $$_PRO_FILE_PWD_
|
|
|
|
cfgs = $$TARGET
|
2017-01-03 18:47:03 +00:00
|
|
|
!isEmpty(_QMAKE_SUPER_CACHE_) {
|
|
|
|
for (s, SUBDIRS) {
|
|
|
|
config.$${s}.dir = $$_PRO_FILE_PWD_/$${s}
|
|
|
|
cfgs += $$s
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
configsToProcess =
|
|
|
|
for (c, cfgs) {
|
|
|
|
s = $$eval(config.$${c}.dir)
|
|
|
|
exists($$s/configure.json): \
|
|
|
|
configsToProcess += $$c
|
|
|
|
}
|
2017-01-03 19:23:19 +00:00
|
|
|
isEmpty(configsToProcess) {
|
|
|
|
!isEmpty(QMAKE_EXTRA_ARGS): \
|
|
|
|
error("This module does not accept configure command line arguments.")
|
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
|
|
|
return()
|
2017-01-03 19:23: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(configure_base)
|
|
|
|
|
|
|
|
QMAKE_POST_CONFIGURE =
|
2016-11-23 17:41:48 +00:00
|
|
|
config.builtins.dir = $$PWD/data
|
|
|
|
configsToProcess = builtins $$configsToProcess
|
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
|
|
|
allConfigs =
|
|
|
|
for(ever) {
|
|
|
|
isEmpty(configsToProcess): \
|
|
|
|
break()
|
|
|
|
|
2018-05-31 18:35:00 +00:00
|
|
|
thisConfig = $$take_first(configsToProcess)
|
|
|
|
currentConfig = config.$$thisConfig
|
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
|
|
|
thisDir = $$eval($${currentConfig}.dir)
|
|
|
|
jsonFile = $$thisDir/configure.json
|
|
|
|
priFile = $$thisDir/configure.pri
|
|
|
|
|
2016-06-11 20:49:01 +00:00
|
|
|
# load configuration data
|
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
|
|
|
configure_data = $$cat($$jsonFile, blob)
|
|
|
|
!parseJson(configure_data, $$currentConfig): \
|
|
|
|
error("Invalid or non-existent file $${jsonFile}.")
|
|
|
|
exists($$priFile): \
|
|
|
|
!include($$priFile): error()
|
|
|
|
|
2017-02-09 16:35:30 +00:00
|
|
|
# only configs which contain more than just subconfigs are saved for later.
|
|
|
|
$${currentConfig}._KEYS_ -= subconfigs
|
|
|
|
!isEmpty($${currentConfig}._KEYS_) {
|
|
|
|
allConfigs += $$currentConfig
|
|
|
|
contains($${currentConfig}._KEYS_, libraries) {
|
|
|
|
qtConfSetupLibraries()
|
|
|
|
# this ensures that references in QMAKE_LIBRARY_DEPS are unique.
|
|
|
|
qtConfSetModuleName()
|
|
|
|
ex = $$eval(config.modules.$${currentModule})
|
|
|
|
!isEmpty(ex): \
|
|
|
|
error("Module $$currentModule is claimed by both $$currentConfig and $${ex}.")
|
|
|
|
config.modules.$${currentModule} = $$currentConfig
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
|
|
# prepend all subconfigs to files to keep a depth first search order
|
|
|
|
subconfigs =
|
|
|
|
for(n, $${currentConfig}.subconfigs._KEYS_) {
|
|
|
|
subconfig = $$eval($${currentConfig}.subconfigs.$${n})
|
2018-05-31 18:35:00 +00:00
|
|
|
name = $${thisConfig}_$$basename(subconfig)
|
2017-02-09 19:55:01 +00:00
|
|
|
ex = $$eval(config.$${name}.dir)
|
|
|
|
!isEmpty(ex): \
|
|
|
|
error("Basename clash between $$thisDir/$$subconfig and $${ex}.")
|
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
|
|
|
config.$${name}.dir = $$thisDir/$$subconfig
|
|
|
|
subconfigs += $$name
|
|
|
|
}
|
|
|
|
configsToProcess = $$subconfigs $$configsToProcess
|
|
|
|
}
|
2018-10-11 12:26:24 +00:00
|
|
|
# 'builtins' is used for command line parsing and test type dependency
|
|
|
|
# injection, but its features must not be processed regularly.
|
|
|
|
allModuleConfigs = $$member(allConfigs, 1, -1)
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-11-15 19:49:43 +00:00
|
|
|
QMAKE_SAVED_ARGS = $$QMAKE_EXTRA_ARGS
|
|
|
|
QMAKE_REDO_CONFIG = false
|
2016-11-23 17:41:48 +00:00
|
|
|
qtConfParseCommandLine()
|
2016-12-23 15:26:50 +00:00
|
|
|
qtConfCheckErrors()
|
2016-11-23 17:41:48 +00:00
|
|
|
|
2017-02-08 17:46:21 +00:00
|
|
|
!isEmpty(config.input.list-features) {
|
|
|
|
all_ft =
|
2018-10-11 12:26:24 +00:00
|
|
|
for (currentConfig, allModuleConfigs) {
|
2017-02-08 17:46:21 +00:00
|
|
|
for (k, $${currentConfig}.features._KEYS_) {
|
|
|
|
pp = $$eval($${currentConfig}.features.$${k}.purpose)
|
|
|
|
!isEmpty(pp) {
|
2017-05-05 13:48:26 +00:00
|
|
|
pfx = $$eval($${currentConfig}.features.$${k}.section)
|
|
|
|
!isEmpty(pfx): pfx = "$$pfx: "
|
2017-02-08 17:46:21 +00:00
|
|
|
all_ft += $$qtConfPadCols($$k, ".......................", \
|
2017-05-05 13:48:26 +00:00
|
|
|
$$pfx$$section(pp, $$escape_expand(\\n), 0, 0))
|
2017-02-08 17:46:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
all_ft = $$sorted(all_ft)
|
|
|
|
logn()
|
|
|
|
for (ft, all_ft): \
|
|
|
|
logn($$ft)
|
|
|
|
error()
|
|
|
|
}
|
|
|
|
|
2017-02-08 18:38:31 +00:00
|
|
|
!isEmpty(config.input.list-libraries) {
|
|
|
|
logn()
|
2018-10-11 12:26:24 +00:00
|
|
|
for (currentConfig, allModuleConfigs) {
|
2017-02-08 18:38:31 +00:00
|
|
|
!isEmpty($${currentConfig}.exports._KEYS_) {
|
|
|
|
!isEmpty($${currentConfig}.module): \
|
|
|
|
logn($$eval($${currentConfig}.module):)
|
|
|
|
else: \
|
|
|
|
logn($$section(currentConfig, ., -1):)
|
|
|
|
all_xp =
|
|
|
|
for (xport, $${currentConfig}.exports._KEYS_) {
|
|
|
|
libs = $$eval($${currentConfig}.exports.$$xport)
|
|
|
|
isEqual($${currentConfig}.libraries.$$first(libs).export, "") { # not isEmpty()!
|
|
|
|
!isEmpty(config.input.verbose): \
|
|
|
|
all_xp += "$$xport!"
|
|
|
|
} else {
|
|
|
|
out = "$$xport"
|
|
|
|
!isEmpty(config.input.verbose):!isEqual(xport, $$libs): \
|
|
|
|
out += "($$libs)"
|
|
|
|
all_xp += "$$out"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
all_xp = $$sorted(all_xp)
|
|
|
|
all_xp ~= s,^([^!]*)!$,(\\1),g
|
|
|
|
for (xp, all_xp): \
|
|
|
|
logn(" $$xp")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
error()
|
|
|
|
}
|
|
|
|
|
2017-04-24 13:23:34 +00:00
|
|
|
QMAKE_CONFIG_VERBOSE = $$eval(config.input.verbose)
|
|
|
|
isEmpty(QMAKE_CONFIG_VERBOSE): \
|
|
|
|
QMAKE_CONFIG_VERBOSE = false
|
|
|
|
QMAKE_CONFIG_LOG = $$OUT_PWD/config.log
|
|
|
|
write_file($$QMAKE_CONFIG_LOG, "")
|
|
|
|
qtLog("Command line: $$qtSystemQuote($$QMAKE_SAVED_ARGS)")
|
|
|
|
$$QMAKE_REDO_CONFIG: \
|
|
|
|
qtLog("config.opt: $$qtSystemQuote($$QMAKE_EXTRA_REDO_ARGS)")
|
|
|
|
|
2018-10-11 12:26:24 +00:00
|
|
|
for (currentConfig, allModuleConfigs) {
|
2016-11-16 14:13:52 +00:00
|
|
|
qtConfSetModuleName()
|
|
|
|
qtConfSetupModuleOutputs()
|
|
|
|
# do early checks, mainly to validate the command line
|
|
|
|
qtConfProcessEarlyChecks()
|
|
|
|
}
|
|
|
|
qtConfCheckErrors()
|
|
|
|
|
2017-07-20 14:03:57 +00:00
|
|
|
QMAKE_CONFIG_CACHE = $$OUT_PWD/config.cache
|
2017-01-09 14:44:30 +00:00
|
|
|
QMAKE_CONFIG_CACHE_USE = $$eval(config.input.cache_use)
|
2017-12-04 20:00:38 +00:00
|
|
|
cache_recheck = $$eval(config.input.cache_recheck)
|
|
|
|
equals(cache_recheck, yes) {
|
|
|
|
QMAKE_CONFIG_CACHE_USE = positive
|
|
|
|
cache_recheck =
|
|
|
|
}
|
2017-01-09 14:44:30 +00:00
|
|
|
isEmpty(QMAKE_CONFIG_CACHE_USE): \
|
|
|
|
QMAKE_CONFIG_CACHE_USE = all
|
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
|
|
|
!equals(QMAKE_CONFIG_CACHE_USE, none) {
|
|
|
|
include($$QMAKE_CONFIG_CACHE, , true)
|
|
|
|
# this crudely determines when to discard the cache. this also catches the case
|
|
|
|
# of no cache being there in the first place.
|
2017-12-04 20:00:38 +00:00
|
|
|
!equals(cache.platform, $$[QMAKE_SPEC])|!equals(cache.xplatform, $$[QMAKE_XSPEC]) {
|
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
|
|
|
QMAKE_CONFIG_CACHE_USE = none
|
2017-12-04 20:00:38 +00:00
|
|
|
} else: !isEmpty(cache_recheck) {
|
|
|
|
for (cr, $$list($$split(cache_recheck, ","))) {
|
|
|
|
!isEmpty(cache.$${cr}._KEYS_) {
|
|
|
|
cache.$${cr}._KEYS_ =
|
|
|
|
} else {
|
|
|
|
qtConfAddWarning("Attempting to discard non-cached result '$$cr'.")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
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
|
|
|
}
|
|
|
|
equals(QMAKE_CONFIG_CACHE_USE, none) {
|
|
|
|
cont = \
|
|
|
|
"cache.platform = $$[QMAKE_SPEC]" \
|
|
|
|
"cache.xplatform = $$[QMAKE_XSPEC]"
|
|
|
|
write_file($$QMAKE_CONFIG_CACHE, cont)
|
|
|
|
}
|
2016-08-16 18:03:54 +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
|
|
|
CONFIG += qt_conf_tests_allowed
|
|
|
|
logn()
|
|
|
|
logn("Running configuration tests...")
|
|
|
|
|
2018-10-11 12:26:24 +00:00
|
|
|
for (currentConfig, allModuleConfigs) {
|
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
|
|
|
tdir = $$eval($${currentConfig}.testDir)
|
|
|
|
isEmpty(tdir): tdir = config.tests
|
|
|
|
QMAKE_CONFIG_TESTS_DIR = $$absolute_path($$tdir, $$eval($${currentConfig}.dir))
|
|
|
|
|
|
|
|
qtConfSetModuleName()
|
|
|
|
|
|
|
|
qtConfSetupTestTypeDeps()
|
|
|
|
|
|
|
|
# correctly setup dependencies
|
|
|
|
QMAKE_CONFIG_DEPS = global global_private
|
2017-02-09 16:35:30 +00:00
|
|
|
QMAKE_LIBRARY_DEPS = $$eval(config.modules.global)
|
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
|
|
|
!isEmpty($${currentConfig}.module) {
|
|
|
|
for (d, $${currentConfig}.depends._KEYS_) {
|
|
|
|
dep = $$replace($${currentConfig}.depends.$$d, -private$, _private)
|
2017-02-09 16:35:30 +00:00
|
|
|
gdep = $$replace(dep, _private$, )
|
|
|
|
dep *= $$gdep
|
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
|
|
|
QMAKE_CONFIG_DEPS += $$dep
|
2017-02-09 16:35:30 +00:00
|
|
|
!isEqual(gdep, $$dep): \ # libraries are in the private module.
|
|
|
|
QMAKE_LIBRARY_DEPS += $$eval(config.modules.$$gdep)
|
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
|
|
|
}
|
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
|
2016-11-11 08:09:12 +00:00
|
|
|
qtConfCheckModuleCondition()
|
|
|
|
|
|
|
|
qtConfHaveModule($$currentModule) {
|
|
|
|
# process all features
|
|
|
|
qtConfProcessFeatures()
|
|
|
|
} else {
|
|
|
|
qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}.skip", "true")
|
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
|
|
|
|
# generate files and reports
|
|
|
|
qtConfProcessOutput()
|
2016-11-11 08:09:12 +00:00
|
|
|
qtConfHaveModule($$currentModule) {
|
|
|
|
qtConfCreateReport()
|
|
|
|
qtConfCreateSummary()
|
|
|
|
} else {
|
|
|
|
QT_CONFIGURE_SKIPPED_MODULES += " $$currentModule"
|
|
|
|
}
|
2016-06-11 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
2016-11-11 08:09:12 +00:00
|
|
|
!isEmpty(QT_CONFIGURE_SKIPPED_MODULES): \
|
|
|
|
qtConfAddNote("The following modules are not being compiled in this configuration:" $$QT_CONFIGURE_SKIPPED_MODULES)
|
|
|
|
|
2016-11-15 19:49:43 +00:00
|
|
|
logn("Done running configuration tests.")
|
|
|
|
logn()
|
|
|
|
|
|
|
|
!$$QMAKE_REDO_CONFIG {
|
|
|
|
write_file($$OUT_PWD/config.opt, QMAKE_SAVED_ARGS)|error()
|
|
|
|
}
|
|
|
|
|
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
|
|
|
# these come from the pri files loaded above.
|
|
|
|
for (p, QMAKE_POST_CONFIGURE): \
|
|
|
|
eval($$p)
|
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
|
|
|
logn("Configure summary:")
|
|
|
|
logn()
|
2016-06-11 20:49:01 +00:00
|
|
|
qtConfPrintReport()
|
2017-01-03 15:59:36 +00:00
|
|
|
|
|
|
|
# final notes for the user
|
|
|
|
logn()
|
|
|
|
logn("Qt is now configured for building. Just run '$$QMAKE_MAKE_NAME'.")
|
|
|
|
pfx = $$[QT_INSTALL_PREFIX]
|
2018-10-12 13:51:38 +00:00
|
|
|
exists($$pfx/.qmake.cache) {
|
2017-01-03 15:59:36 +00:00
|
|
|
logn("Once everything is built, Qt is installed.")
|
|
|
|
logn("You should NOT run '$$QMAKE_MAKE_NAME install'.")
|
2016-11-21 14:32:04 +00:00
|
|
|
logn("Note that this build cannot be deployed to other machines or devices.")
|
2017-01-03 15:59:36 +00:00
|
|
|
} else {
|
|
|
|
logn("Once everything is built, you must run '$$QMAKE_MAKE_NAME install'.")
|
|
|
|
logn("Qt will be installed into '$$system_path($$pfx)'.")
|
|
|
|
}
|
|
|
|
logn()
|
|
|
|
logn("Prior to reconfiguration, make sure you remove any leftovers from")
|
|
|
|
logn("the previous build.")
|
|
|
|
logn()
|