[Development] Notes on "Qt Build Systems" @ QtCon 2016

Christian Kandeler Christian.Kandeler at qt.io
Tue Sep 13 21:10:10 CEST 2016


[Sorry about the formatting, using outlook]

Stephen Kelly wrote:
> Here's the CMake version:

[ ... ]

>      execute_process(
>       COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/generator.py --list
> ${CMAKE_CURRENT_BINARY_DIR}/genoutput 5
>       OUTPUT_VARIABLE fileList
>     )

How do you know where the input file is located?

> However, it is cheating in the same way that the QBS version from
> Christian is cheating - it assumes '--list' exists:

Yes, I was assuming a cooperating tool.

> Christian, can you create a version which does not require --list?

There are two possibilities:
a) The inner workings of the tool are known and "simple enough". That's the case in Bo's example, so there we could just open the input file and derive the output artifacts from the number we find there.
b) Otherwise, our outputArtifacts script has to run the tool in "real mode" (using the "--generate" option). The actual command would be a no-op then. This is icky, both conceptually and for practical reasons, because commands of non-competing rules are run in parallel, whereas the outputArtifacts scripts are not. I think so far we only use this approach for the infamous qdoc tool.


Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160913/b879f8b9/attachment.html>


More information about the Development mailing list