21.07.2020 16:45, Christian Kandeler пишет:
On Tue, 21 Jul 2020 15:10:38 +0300
Карелин Павел <hka...@yandex.ru> wrote:

I recently needed to develop a rule for a sip generator (see below).
Basically, the rule works well, but yesterday it failed. At the output,
sip-generator create 6 cpp-files of the following format:
sip_corepartX.cpp (this is justified from the point of view of parallel
compilation, cpp-file sizes can be tens of megabytes). These 6 cpp-files
are reflected in the outputArtifacts parameter. However, yesterday I
came across a small sip-file, and the generated cpp-files turned out to
be not 6, but only 5. Naturally, my rule failed.

Question: how can I resolve my situation?
Do I understand you correctly that you don't really know in advance how many 
files will be generated, i.e. the -j parameter just specifies a maximum?
Yes, exactly
Then you either need to find a way to find out the value beforehand (by 
analyzing the input in some way), or, if that is not possible, you cheat and 
call the tool already in the outputArtifactsScript; the prepare script then 
just sets up a dummy command.
How can I execute Command from outputArtifacts?

Note that this loses concurrency, as rule execution happens in the main thread. 
But this might be acceptable for short-running tools.


Christian
_______________________________________________
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs

--
Pavel
_______________________________________________
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs

Reply via email to