Revision 1 as of 2007-11-06 13:41:27

Clear message

Write CMakeLists.txt for the CALICE software

To write the CMake scripts, use the package calice_reco as template (mostly cut and paste).

Files you have to create (by copying from calice_reco + editing):

If the package consist of several sub packages: ( CMakeLists.txt from <calice_reco>/CMakeLists.txt ) A "configuration" CMakeLists.txt in every directory, where you find an old env.sh script by Roman. ( CMakeLists.txt from <calice_reco>/raw2calohit/CMakeLists.txt ) A "makefile like" CMakeLists.txt in the "src" directories ( CMakeLists.txt from <calice_reco>/raw2calohit/src/CMakeLists.txt )

The cmake diretory in the base directory of the package ( cmake/ from <calice_reco>/cmake ; just copy the directory )

A template for the Config.cmake script: ( XXX/cmake/XXXConfigure.cmake.in from <calice_reco>/raw2calohit/cmake/RAW2CALOHITConfigure.cmake.in )

To write the scripts, just copy the files and try to start editing them. If there is something you don't understand, please ask.

To find all build options needed by a package, use

grep -i -r "#ifdef" * |cut -d":" -f2 |sort|uniq

to find all ifdef's in the source code. Please inspect the results manually to check which of the ifdef's change class definitions (the library API).

To understand the build system, this _might_ help:

This text explains the ideas and specific contents of these CMake files to build the calice-userlib.

0) While these CMake scripts are aware of the ILC core software CMake

1) The cmake build system for calice_userlib consists of:

2) <calice_userlib>/CMakeLists.txt in detail (proceed to 3) if in a

3) <calice_userlib>/src/CMakeLists.txt: This file more or less

4) Although for every package (LCIO, LCCD, ... ) more or less the same

5) A)-C) contains some additional useful information on cmake.

6) good luck

A) Documentation can by found by calling cmake --help-command-list and

B) while the command are case insensitive, some (most) of the options

C) Remarks on CMake Variables: Variables can be set with CMake's