[CMake] Changing the default name "CMakeLists.txt"

Martin Lütken mlu at danware.dk
Thu Aug 30 05:44:15 EDT 2007


>From a simple grep in the cmake CVS sources I think that to add such an option 
>first would require to have a unified place with the "CMakeLists.txt" string 
>value because currently there are about 15 different places in code where the 
>string is hardcoded, about 30 places where it appears in messages generated 
>from the code and A LOT of code comments and cmake module comments where it's 
>used (tho the comments can be left in place since they still make sense 
>talking about a CMakeLists.txt file even if that is configurable).

All in all I don't think it's very hard to do it, would result in a better 
cmake code organization too (not having scattered "CMakeLists.txt" magic 
value all over the code).

Sounds great! I will consider doing it!
The thing is that I am trying to make a sort of "unified" or "common build system" (cbs) for which I 
use cmake. The idea was that open source projects could maintain such a cbs-makefile, which combined 
with a set of common cmake files would make it very easy to to use 3rd party libraries within your own code.

A short intro is on the very preliminary web page (cpaf.sourceforge.net) repeated here:
---------------------------------------------------------------
The cmake based build system along with associated python helper scripts have been factored out as a seperate project located in cpaf/cbs for now. The general idea is to supply a general and very simple way to produce a cbs/cmake file(s) for a project (e.g. a library) and then this library can build seamlessly together with other "cbs-enabled" libs/apps.

In your top level directory of your own project you also keep a myprj.BuildConfig.cmake file which contains a use entry/line for every library you want to enable/use in your project like this:

# --- 3RD PARTY LIBRARIES ---
SET ( z_USE                         SYSTEM   )  # Use system installed version
SET ( png_USE                       BUILD    )  # Build from local source code
SET ( bz2_USE                       DISABLED )  # Don't use this lib at all
SET ( boost_USE                     PREBUILT )  # Use allready locally (cbs) compiled version of boost.

# Other build options
SET ( z_LINK_TYPE                   STATIC    ) # Force static version of zlib even when cbmake.py -l shared is used.    



So the (perhaps naive) hope is that many open source SW projects will pick up the idea and provide cbs build files for their code. See the "CBS Introduction" page how simple it really is to use this system.

--------------------------------------

The reason I would like another default CMakeLists.txt name is that I don't want to conflict with projects  using cmake allready for their build process.
-- 

>Mihai RUSU					Email: dizzy at roedu.net
>			"Linux is obsolete" -- AST
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070830/9d8a375e/attachment.html


More information about the CMake mailing list