summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-09-26 18:49:26 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2021-09-20 08:48:39 +0000
commit19090f5ff1681503096e8797159e773600692903 (patch)
treeb34f68e51ef22486fc64d7409d856fd9c486b54d /doc
parentb70bd9531f73382fe7ec1e1c7179d1d7aba92e58 (diff)
downloadqbs-19090f5ff1681503096e8797159e773600692903.tar.gz
Implement qbsModuleProviders property
It is now possible to specify which providers should be run by providing the list of provider names. The desired providers can be selected on the Project and Product levels. Task-number: QBS-1604 Change-Id: Ib0782df00e3086104345f4b740fc1696d715344c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/qbs.qdoc21
-rw-r--r--doc/reference/items/language/moduleprovider.qdoc13
-rw-r--r--doc/reference/items/language/product.qdoc12
-rw-r--r--doc/reference/items/language/project.qdoc16
4 files changed, 56 insertions, 6 deletions
diff --git a/doc/qbs.qdoc b/doc/qbs.qdoc
index 7b8082f55..ac7bf20c2 100644
--- a/doc/qbs.qdoc
+++ b/doc/qbs.qdoc
@@ -1743,7 +1743,12 @@
If \QBS encounters a \l Depends item whose name does not match a known module,
it checks whether such a module can be generated. This procedure works as follows:
\list 1
- \li All \l{Project::qbsSearchPaths}{search paths} are scanned for a file called
+ \li If the \l{Product::qbsModuleProviders}{qbsModuleProviders} property is not
+ \c undefined, for each provider name in the list, all
+ \l{Project::qbsSearchPaths}{search paths} are scanned for a file called
+ \c {module-providers/<name>.qbs} or \c {module-providers/<name>/provider.qbs}.
+ \li If the \l{Product::qbsModuleProviders}{qbsModuleProviders} property is \c undefined,
+ \l{Project::qbsSearchPaths}{search paths} are scanned for a file called
\c {module-providers/<name>/provider.qbs}, where \c <name> is the name of the dependency
as specified in the \c Depends item. Multi-component names such as "a.b" are turned
into nested directories, and each of them is scanned, starting with the deepest path.
@@ -1765,6 +1770,20 @@
\l{no-fallback-module-provider}{--no-fallback-module-provider} option.
\endlist
+ \section1 Selecting Module Providers
+
+ As described above, it is possible to select which providers to run using the
+ \l{Product::qbsModuleProviders}{qbsModuleProviders} property. Providers contribute to the
+ \l{Product::}{qbsSearchPaths} in the order specified by this property, so modules generated
+ by providers specified earlier are prioritized. This property can be set on the
+ Product as well as the \l{Project::qbsModuleProviders}{Project} level:
+
+ \code
+ $ qbs resolve project.qbsModuleProviders:providerA \ # sets property globally for the Project
+ projects.SomeProject.qbsModuleProviders:providerB \ # overrides property for the specific Project
+ products.SomeProduct.qbsModuleProviders:providerC \ # overrides property for the specific Product
+ \endcode
+
\section1 Parameterizing Module Providers
You can pass information to module providers from the command line, via profiles or
diff --git a/doc/reference/items/language/moduleprovider.qdoc b/doc/reference/items/language/moduleprovider.qdoc
index d5b14ee88..ac3b4f0bf 100644
--- a/doc/reference/items/language/moduleprovider.qdoc
+++ b/doc/reference/items/language/moduleprovider.qdoc
@@ -69,11 +69,14 @@
The name of the module provider.
- This property is set by \QBS. For simple dependency names, it is the name of the dependency
- as specified in the \l Depends item. If the dependency name consists of multiple components,
- the value is the name up until (and including) the component that corresponds to the directory
- the provider was found in. For instance, if the dependency is \c {x.m1} and the provider was
- found in \c {module-providers/x/m1/provider.qbs}, then \c name is \c {x.m1}.
+ This property is set by \QBS.
+
+ If provider is \l{How \QBS Uses Module Providers}{requested} via the
+ \l{Product::qbsModuleProviders}{qbsModuleProviders} property, it is the name specified in this
+ property and matches the provider file name, without the \c .qbs extension.
+ Otherwise, it is the name of the directory the provider was found in, relative to
+ the particular module-providers base directory. For instance, if the dependency is \c {x.m1} and
+ the provider was found in \c {module-providers/x/m1/provider.qbs}, then \c name is \c {x.m1}.
If the provider was found in \c {module-providers/x/provider.qbs}, then \c name is \c x.
*/
diff --git a/doc/reference/items/language/product.qdoc b/doc/reference/items/language/product.qdoc
index af45a9c29..1ae29741c 100644
--- a/doc/reference/items/language/product.qdoc
+++ b/doc/reference/items/language/product.qdoc
@@ -283,3 +283,15 @@
The value of this property is automatically set by \QBS and cannot be
changed by the user.
*/
+
+/*!
+ \qmlproperty stringList Product::qbsModuleProviders
+
+ The list of \l{Module Providers} to use for this product.
+
+ Overrides \l{Project::qbsModuleProviders}{Project.qbsModuleProviders}.
+
+ \sa Project::qbsModuleProviders
+
+ \since Qbs 1.21
+*/
diff --git a/doc/reference/items/language/project.qdoc b/doc/reference/items/language/project.qdoc
index 24454a0f8..b1dc6e9de 100644
--- a/doc/reference/items/language/project.qdoc
+++ b/doc/reference/items/language/project.qdoc
@@ -125,3 +125,19 @@
\defaultvalue \c "1.3.0"
*/
+
+/*!
+ \qmlproperty stringList Project::qbsModuleProviders
+
+ The list of \l{Module Providers} to use for this project.
+
+ Providers contribute to the \l{Product::}{qbsSearchPaths} in the order specified here, so
+ modules generated by providers specified earlier are prioritized.
+ Currently, this order also corresponds with the actual execution order of the providers, but
+ this should not be relied upon.
+
+ \sa Product::qbsModuleProviders
+
+ \since Qbs 1.21
+*/
+