[Insight-developers] using CMake for multi-source executables

Bill Hoffman bill.hoffman@kitware.com
Thu, 22 Feb 2001 09:02:45 -0500


Ken recently added a feature where you can have a library and
an executable in the same CMake file.    That is about as close as
you can get.  It is usually better to create a library any way,
and have the main be small.   With shared libraries that means that
the main exe is linked infrequently.   Only the library needs to be
rebuilt.


LIBRARY(MAINLIB)
SOURCE_FILES( .... )
EXECUTABLE(mmm)
LINK_LIBRARES(MAINLIB)


-Bill

At 02:50 AM 2/22/2001 -0500, Luis Ibanez wrote:
>Hi,
>
>I'm trying to build an executable with
>multiple source files using CMake.
>But I'm missing something...
>
>----
>
>The command
>
>EXECUTABLES(  mmm )
>
>expects the files mmm.h and  mmm.cxx to exist.
>that's ok (I just give up the main.cpp for mmm.cxx )
>
>I tryed putting the other sources on the
>command SOURCE_FILES() but they seems to
>be ignored...
>
>What's the right way to specify a set of source
>files for building a common executable ?
>
>Thanks
>
>Luis
>
>
>
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-developers