[Cmake] Cmake flexibility

William A. Hoffman bill.hoffman at kitware.com
Tue Mar 18 21:54:36 EST 2003


>
>
>1) I have put Test (i.e. where the test programs and scripts go) under
>the class implementation, rather than have a whole parallel
>Testing directory (e.g. like in ITK).
>
>The trouble is that Cmake seems to like to make recurseive
>makefiles.  What I'd like is make files in Module1 and Module1/Test
>but not that the latter gets built wheneveer the former is built.
>I.e. the programmer drops into Test when ready.   If I don't
>use the SUBDIRS CMake command, no makefiles at all get
>build in Test...
>
>How do I do this with cmake ?

There is no way to have a sub directory with a makefile that is not 
recursed into by make.
You could have a cmake option that controls the inclusion of the SUBDIR 
command,
something like BUILD_TESTING.   The only other option is to separately run 
cmake
on the Test directories and treat them like separate projects.

If the Tests are part of the build, you can have cmake run the tests as 
well as build them
with the ADD_TEST command.


>2)  In Source/Documentation there will be all sorts; HTML, LateX etc. The
>built output needs to go in OUtput/Docs.
>
>CMake only seems to make C++/C makefiles.  Is there a way to
>put other compilation types into it (e.g.  Latex, Latex2html etc) ?
>Or does one simply have to write your own build scripts for
>these types of documents.
>

The ADD_CUSTOM_COMMAND command can be used for things like this.
Several examples have been recently posted to the cmake list.   Also, ITK and
VTK contain examples of using ADD_CUSTOM_COMMAND to build latex and
java.

-Bill



>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake






More information about the CMake mailing list