[Qt-interest] which build tools to use?

Gordon Schumacher gordon at rebit.com
Sat Dec 5 03:37:15 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Glenn Hughes wrote:
> Hi all,
>
> I'm just starting in on a large Qt project, and I was wondering if
> anyone had opinions on the best build process to use. I'm working
> under OS X for now. The project has several thousand source files in
> dozens of directories that build into a couple of OS X Frameworks,
> plus several dylibs.
>
> Has anyone figured out how to build using only XCode, i.e. not
> involving qmake at  all? I'm currently using only XCode, so this
> approach would probably require the smallest initial time investment
> (but might not be a good long-term solution).
>
> If that's not an option, what about CMake? (Seems powerful, but
> complicated...)

I have zero experience with building in OSX, but I can pass along one
tidbit of experience...

Unfortunately, my present opinion is that *all* the currently
available build tools suffer from one or more major shortcoming (and
please note "major" in that sentence).  That said, CMake is IMHO the
lesser evil at present for building Qt or portable C++ projects.  Its
syntax is inconsistent and its documentation is sorely lacking in some
places... but it (mostly) knows how to handle Qt4 projects out of the
box, and you're not likely to run into the major issues unless you're
trying to do something especially unusual or complex.

For those about to argue against my claims about CMake, I offer you
three challenges, from easiest to hardest:
1) What's the difference between "macro()" and "function()", and what
are all the effects of that difference?  (And... where did you find
that information?)
2) How do you use ExternalProject_Add() - particularly if you want to
invoke it against an already-extant local directory?  (And again...
how did you find out?)
3) How should you set things up if you need to be able to use more
than one build of a given library - say, Qt4 - within a single project
hierarchy?  For example, project A needs to build against Qt build A,
and it needs to invoke "add_subdirectory(B)" where B needs to build
against Qt build B.  Bonus points if you can make cache variables from
B propagate upward so that you can still configure them from the top
level.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
iEYEARECAAYFAksZx1sACgkQ2yRp4mXKHF3iOQCfdIxq7MsFIg4FtdIGmrLia5K7
ePcAn1qeHgPcDWYSt1Ts5RggL6svattF
=4Y/H
-----END PGP SIGNATURE-----




More information about the Qt-interest-old mailing list