[Interest] qmake: questions regarding huge projects
konrad at silmor.de
Mon Apr 22 19:22:18 CEST 2013
On Friday 19 April 2013 13:36:36 Bo Thorsen wrote:
> Den 19-04-2013 12:29, Rainer Wiesenfarth skrev:
> > well, I know about cmake, but was going for something less cryptic... :-)
> > We have some fancy build stuff (f2c, versioning, ...), but I was hoping
> > to get it done with qmake, _because_ it is simple.
> I know, but when you have a complicated build process, a simple tool
> just doesn't cut it.
Let's correct that a little: simple stuff is very simple with qmake,
complicated stuff is very complicated with qmake, but not impossible.
You can introduce new compilers and generators as well as complex internal
dependencies, but it takes quite a bit of experience to do so.
The one thing that qmake does not do well is looking for external tools -
among Linuxers known as the "configure step". So if I have to scan for non-Qt
dependencies that are not part of my own build-tree, then I employ an
additional script to search for them and output a .pri file that is re-used in
the project files for qmake.
Qmake has some severe limitations:
+ it can handle all of Qt out of the box
+ you can formulate project internal dependencies (beware the syntax!)
+ you can share configurations if you put them in .pri files
+ you can add simple compilers (1 source file -> 1 destination file)
- more complex generators are not possible, like
-- m source files n destination files
-- if you do not know the destination file names yet
- searching for external dependencies is not possible
-- if you know you need Python, but have to search for the version: forget it
- if shell commands for an action differ per OS, the statements become
exponentially more complex or you have to write something in another
language (e.g. Perl, Python, C++, ...)
- scanning for features before building the Makefile is not possible (e.g. if
you have to find out whether you have memcpy or bcopy)
So if you have to do any of the "impossible" tasks you have to put them before
the qmake run and generate include files for the qmake project - just like the
configure script for Qt itself.
If you can live with this then qmake is a very good tool for you. For example
I've been known to put the "impossible" stuff into Tcl scripts for a project
that needs a Tcl environment anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part.
More information about the Interest