[QBS] rebuild / automatic scan dependencies

Christian Kandeler christian.kandeler at theqtcompany.com
Wed Feb 25 11:04:02 CET 2015


On 02/24/2015 12:14 PM, Schmidt, Jan wrote:
> I try'd to build helloworld-minimal from 1.3.3:
>
> after that, the binary exists. If I remove that file,
> qbs does not rebuild it.

You should not interfere with the contents of the build directory; it's 
supposed to be under the build system's control. There is the 
--check-timestamps switch to force qbs to re-evaluate the timestamps of 
output artifacts, but this is not recommended except to re-sync the 
build graph after such an external modification of the build directory.

> Second:
> Is there a way to scan the dependencies automatically?
> With make,I add a Compiler-Switch (-MMD for gcc). Then the
> compiler creates a file .d wich I can include in the
> makefile.
> If I touch such header and re-run make, the file is compiled
> again.

This functionality is built in.

> With qbs this is not happen.

I dispute this. Please file a bug report if you can demonstrate the problem.

> I don't want to add each header to the qbs-file per hand.

This is completely unrelated to the issue above. All header files become 
dependencies of the files that include them, whether they are part of 
the project or not.
(Independent of that, it is of course a rather short-sighted decision to 
give the build system an incomplete list of files; e.g. such headers 
won't show up in an IDE's project overview.)


Christian



More information about the Qbs mailing list