[QBS] How to resolve dependencies on generated header files

Richard Weickelt richard at weickelt.de
Thu Aug 7 15:14:53 CEST 2014


>> What 'automatically' means then in the above paragraph? Does it mean
>> anything beyound "generated header files can be tagged and therefore serve
>> as dependencies for other rules"?
> 
> If there's a foo.cpp that includes foo.h and foo.h is generated by such a
> dyamic rule then a dependency from foo.cpp to foo.h is added. If the rule
> decides in a later build that foo.h is not generated anymore, then foo.h
> (and the dependency) is removed.
> That's basically what I tried to compress into the word "automatically".
> No magic, maybe even not worth mentioning, but an important automatism.

Eureka! Thank You for explaining. I think, my problem is located in the
definition of 'dependency' which seems to have a rather temporal meaning.
Let me repeat in my own words what You have said: If foo.cpp includes foo.h,
QBS detects a *dependency* between them through its built-in cpp-scanner.
Dependency means: if foo.h is generated by a rule, QBS ensures, that foo.h
is generated *before* foo.cpp is compiled. It does *not* add the output
folder of foo.h to the includePath of foo.cpp. The latter is what I have
expected and where the confusion comes from.

Is this correct?

Richard


-- 
Richard Weickelt
Jagowstraße 15
10555 Berlin
Germany

Tel:    (+49) (0) 30 96 60 30 90
Fax:    (+49) (0) 355 5 478 477 9
Mobil:  (+49) (0) 151 23347215



More information about the Qbs mailing list