I just found a perfect example of how hard building a JAR file is in qmake for
example, compared to qbs:
qbs-javac-scan.pro
Description: qbs-javac-scan.pro
qbs-javac-scan.qbs
Description: qbs-javac-scan.qbs
And the qmake version technically doesn't even handle dependencies properly (e.g. removing an anonymous inner class will still result in the corresponding (stale) class file being included in the JAR file).
Another thing that's very hard to do in other build systems is building Java code. The class files emitted by a Java compiler actually vary depending on the contents of the Java files themselves.
Imagine you've built a JAR file, and then you add a new anonymous inner class within one of your Java source files. The command line invocation to build the JAR file needs to be updated to contain the new class file that will result. Impossible
with qmake/CMake/Makefiles/etc.
Whereas Qbs has sophisticated support exactly for this case: https://github.com/qt-labs/qbs/tree/master/share/qbs/modules/java, made possible by its dynamic
build graph.
Den 08-09-2016 kl. 14:19 skrev Konstantin Tokarev:
> The only problem is that you have to run moc on each of the .h files.
Run moc from inside script when you generate header.
Yes, I thought about that at the time as well. While simple enpough, there are some complications. You would have to run moc exactly like if it was done by the qmake built makefiles, with exactly the same environment and arguments. Not impossible, but it does
sound brittle. For example different qmake versions might do things differently.
Bo Thorsen,
Director, Viking Software.
--
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
Qbs build tool evangelist - qbs.io
_______________________________________________ Development mailing list Development@qt-project.orghttp://lists.qt-project.org/mailman/listinfo/development
Qbs build tool evangelist - qbs.io
|
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development