[QBS] propagate compiler options
Andrii Anpilogov
anpilog at gmail.com
Fri Jan 16 09:38:22 CET 2015
Hi Richard,
> > The double reference/Depend stuf is also a thing I don’t understand and
> > is in my opinion redundant. And as you say; inconvenient. As a programmer
> > I never want to do things twice ;-)
>
> It's not redundant. References are on project level. Dependencies are on
> product level.
>
What is missed is ability to add references from Product. This limitation
is really annoying for projects with nested dependencies. For example I
have few libraries that depends on almost 10 drivers (each is separate
Product) so I have to define very long list of references in the project.
I understand it's kind of rare case. It seem to me kind of big change to
qbs.
Don't get me wrong, I don't complain about it just want to example it here
and maybe you guys implement it one day.
BTW, I applied this trick to remove "redundant" Depends in root Product:
Of course it's ugly trick but probably someone could find it useful for
existing projects...
import "RootProject.qbs" as RootProject
Project {
references: ["libA.qbs", "libB.qbs", "libC.qbs"]
RootProject {
}
}
RootProject.qbs:
import qbs.FileInfo
Product {
Depends { name: FileInfo.baseName(project.references[0]);
condition: !!project.references[0] && autoDepends }
Depends { name: FileInfo.baseName(project.references[1]);
condition: !!project.references[1] && autoDepends }
Depends { name: FileInfo.baseName(project.references[2]);
condition: !!project.references[2] && autoDepends }
// Add reasonable amount of possible dependencies.
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20150116/a6f98f39/attachment.html>
More information about the Qbs
mailing list