[Qt-interest] Project directory tree with test code subtree (TDD)

Islam Samir Badreldin islam.badreldin at gmail.com
Sat Feb 14 15:28:43 CET 2009


Hello Everybody,

I am trying to create a new _large_ project with Qt. I want to do unit 
testing for every class I have in this project (sort of TDD). I am 
asking about how to use 'qmake' in such scenario?

My hierarchy may look something like this:

trunk----> src -->
      |
      --> test -->

I want the 'test' tree to mirror that of the 'src' tree. What I want to 
have is to be able to call 'qmake' then 'make' under _any_ directory in 
the 'test' tree and have the Makefile automatically _link_ (not compile) 
the needed *.o files from the 'src' tree (i.e. the object code of the 
classes I am currently testing). I assume here that the *.o files 
actually exist in their proper place under the 'src' tree.

In short: I want the Makefile to _link_ some additional object files 
from another directory other than the current build directory!!

Is this a possible setup for the project using 'qmake'? If not, what is 
the perfect setup for TDD with Qt and 'qmake'? Any help on this is 
largely appreciated!

Best regards,
Islam



More information about the Qt-interest-old mailing list