[Cmake] multiple compile of an object
Ken Weinert
Ken.Weinert at ihs.com
Fri May 16 11:47:17 EDT 2003
OK, I thought I had this one solved, but it turns out that it isn't
quite right.
My situation is this:
I frequently write a little test program into my class
definitions. That is, at the end of the file where all the methods
have been defined you'll find something like this:
#if defined(<CLASSNAME>_MAIN_NEEDED)
int main()
{
// test code goes here
}
#endif
And then I'll compile a small standalone test program and also
compile the .o to be included in the main program.
Is there a way to automate this in CMake? If so, a pointer to
where it might be documented (or an idea of how to do it) would be
appreciated.
Thank you.
--
/~\ The ASCII Ken Weinert Ken.Weinert at ihs.com
\ / Ribbon Campaign 303-858-6956 (V) 303-705-4258 (F)
X Against HTML GnuPG: 9274F1CE GnuPG available at http://www.gnupg.org/
/ \ Email! 1D87 3720 BB77 4489 A928 79D6 F8EC DD76 9274 F1CE
Giving up on assembly language was the apple in our Garden of Eden:
Languages whose use squanders machine cycles are sinful. The LISP
machine now permits LISP programmers to abandon bra and fig-leaf. --
Alan J. Perlis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20030516/e6b1d624/attachment.sig>
More information about the CMake
mailing list