Dear all
I thought a lot about this and fr now have settled for the following:
1. There is a UnitTest directory added in calitko top level dir
2. The sources directory structure where even is replicated … What I mean is if there is a .cpp or .h file in the original source tree, that directory is created ….
If you run the first command in the attached scritp file ( it uses nifty zsh features ;-), it creates what I mean….
3. Next every source file found in the original source tree, a symlink is created in the UnitTest directory with a u prefix ( the second line in the script …. it looks a bit hairy for non unix users so I can explain it in detail if needed )
4. Now I can write a makefile and there is no danger of overwriting a .o file ( as the directory and names are very different ;-)
5. UNIT_TEST will be defined only in the UnitTest Makefile and so running make && ./calitko runs the test cases. The original Makefile and ./calitko are not touched at all
6. But the sources are shared ( that is why I am using symlinks ;-)
I will post the unittest makefile once I finish writing some tests… ;-)
7. From the main makefile we can trigger the make and run of unit tests
For Windows users: If you are using cygwin, things should work as given…
Let me know what you all think….
