[CMake] global variable

klaas.holwerda kholwerd at xs4all.nl
Fri Sep 9 17:16:01 EDT 2005


Brad King wrote:

> You'll be surprised how rarely this is really needed if the directory 
> structure is organized properly.

I use it to collect information to generate a CMakeList.txt file to be 
used by users of my library.
So i have a variable for all include paths need by the user, same for 
libs and defines.

I agree that it is in general not needed to make a module, but if 
modules use other modules (optional ) etc. it is often to  share 
information from one module to another  (e.g. which  defines and libs 
are needed if a  certain module  is  switched on.) One can simply not 
link a library to a target, if that library was not generated.
Anyway i often have the need i think ;-)

You solution looks very nice.

I will submit the request, if not already done by John??

Thanks!

Klaas


More information about the CMake mailing list