I already use the second variant.
The maximum that I export this:
Export {
Depends { name: "cpp" }
cpp.includePaths: product.exportIncludePaths
}
But to connect files, I use wildcard mask almost everywhere. In topic
"Improving qbs resolve performance"
(https://lists.qt-project.org/pipermail/qbs/2019-July/002481.html)
Christian Kandeler does not recommend doing this. But now I can’t do it
differently - there are a lots of files, and I can’t connect them all
individually.
--
BR, Pavel Karelin
30.06.2020 11:24, Jochen Ulrich пишет:
We faced similar problems but our resolve times were even higher (30 s to 2
mins).
We were able to work around this and significantly reduce the resolve times by
avoiding transitive dependencies (meaning exporting dependencies).
So instead of this:
Product {
name: “A”
Depends { name: "B" }
}
Product {
name: “B”
Depends { name: "C" }
Export {
Depends { name: "C" }
}
}
Product {
name: “C”
Depends { name: "SomeLibNeededEverywhere" }
Export {
Depends { name: "SomeLibNeededEverywhere" }
}
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
You do it like this
Product {
name: “A”
Depends { name: "B" }
Depends { name: "C" }
Depends { name: "SomeLibNeededEverywhere" }
}
Product {
name: “B”
Depends { name: "C" }
Depends { name: "SomeLibNeededEverywhere" }
}
Product {
name: “C”
Depends { name: "SomeLibNeededEverywhere" }
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Of course it is ugly because you have to maintain the transitive dependencies
manually.
However, if you have cases where a dependency is needed in many places, you can
create custom products that include it.
For example:
// qbs/imports/MyBaseApplication.qbs
CppApplication {
Depends { name: "SomeLibNeededEverywhere" }
}
// in other .qbs files use MyBaseApplication instead of CppApplication
MyBaseApplication {
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
See also this thread on the mailing list:
https://lists.qt-project.org/pipermail/qbs/2019-July/002477.html
and the follow up:
https://lists.qt-project.org/pipermail/qbs/2019-August/002544.html
Kind regards
Jochen Ulrich
Von: Qbs <qbs-boun...@qt-project.org> im Auftrag von Карелин Павел
<hka...@yandex.ru>
Datum: Dienstag, 30. Juni 2020 um 09:45
An: "qbs@qt-project.org" <qbs@qt-project.org>
Betreff: [Qbs] QBS script parsing speed
Hello.
Now I'm trying to write a QBS build script for a fairly large project (QGIS).
After making every change to the build script - the project tree is rebuilt and
QtCreator freezes for 10-15 seconds.
It seems that 10-15 is not so much, but since I have to make a lot of changes
in the script, in the aggregate the slowdown turns out to be quite significant.
I suppose I was not the only one who faced a similar problem on large projects.
I would like to know if any measures are being planned to increase the speed of
re-parsing a project?
I am using QtCreator 4.11.2 (QBS 1.15.1)
--
BR, Pavel Karelin
_______________________________________________
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs