[CMake] New to cmake, questions

taintedham-mailinglists at yahoo.com taintedham-mailinglists at yahoo.com
Tue Jun 21 03:01:28 EDT 2005


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.

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.

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


More information about the CMake mailing list