[Cmake] Cmake flexibility
Amitha Perera
perera at cs.rpi.edu
Tue Mar 18 21:50:18 EST 2003
On Tue 18 Mar 2003, Neil Killeen wrote:
> I am generating a s/w system with a directory structure along the lines of
>
> Source
> Code
> Modules
> Module1
> Test
> Module2
> Test
> Applications
> App1
> App2
> Documentation
>
>
> 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 ?
I'm not sure that CMake can do that. One way is to have a variable
that defines if the SUBDIRS command is executed or not. I assume you
know this approach and are not satisfied with it.
Another alternative that may work is to list
SUBDIRS( Module1 Module1/Test )
at the Modules level.
> 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.
I believe Andy has answered this question many times on this list. A
search on the list archives will probably turn up something. (Search
using google, I guess, with site:kitware.com).
Amitha.
More information about the CMake
mailing list