Hi!

I'm new to cmake and couldn't find a solution for my problem:

I've a directory src containing the complete source code of the program and
another directory called test containing the source code for the unit tests.
In the top level directory is a CMakeLists.txt that points to the 
subdirectories containing each an own CMakeLists.txt for building the program 
or the unit tests.

Now I want to use the already build object files from the src directory one 
time for linking the program and one time for linking to the unit tests.

My current way is building a static library in the src directory and link the 
unit tests against this library. But the sources would be compiled twice: One 
time for the static library and one time for the program itself.


I thought unit tests were a standard think. But I didn't find a suitable answer 
asking google (maybe I used the wrong search terms)...


Christoph
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to