[CMake] New to cmake, questions

Filipe Sousa filipe at ipb.pt
Tue Jun 21 05:23:21 EDT 2005


On Tuesday 21 June 2005 08:01, taintedham-mailinglists at yahoo.com wrote:
> Hey everyone,
> I just started using CMake and I've got a few
> questions.
>
> 1.  Is there a way to tell CMake to stick its
> generated files into a directory?  Right now I'm
> creating a CMakeLists.txt in the top directory and it
> puts all the generated files in the same directory...
> I'd like to have it put that stuff in a CMakeGen
> directory instead.

Don't run cmake in source directory. You have create a directory for
the generated files and run cmake from there

$ mkdir CMakeGen
$ cd CMakeGen
$ cmake path-to-your-project-source-dir

> 2.  Is there a good place to go and see how people
> have used CMake, I looked on the Wiki though there
> doesn't seem to be a lot of CMakeLists.txt file
> samples.

Start looking in Project Root combo box
http://public.kitware.com/cgi-bin/viewcvs.cgi/?cvsroot=CMake

> 3.  What I would really like to know how to do with
> CMake is:  I want to make a directory called Tests.
> At the top level there is a CMakeLists.txt that adds
> all the subdirectories of a test directory inside the
> Tests folder.
>
> Inside the test folder... I'd like each subdirectory
> to be its own project (create exe for each).  So if I
> had a cirle and square program it would look like so:
> Tests->test->circle
>                    ->src
>                    ->inc
> Tests->test->square
>                    ->src
>                    ->inc
>
> What I want... is to be able to define common
> includes/libraries for each of the programs in the
> test folder.
>
> Adding a new program would be as simple as creating a
> new folder in the test directory.  (hopefully, there
> would be a CMakeLists.txt that could be simply copied
> into that directory... not edited by hand at all)
>
>
> Any ideas, Thanks!
> --Dave
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake

-- 
Filipe Sousa
-------------- 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/20050621/1972835e/attachment.pgp


More information about the CMake mailing list