TWiki> LHCb Web>LHCbComputing>AddProject (revision 11)EditAttachPDF


An LHCb software project is basically a collection of packages that, optionally, depend on other projects.

A project is described by a CMT description file (project.cmt), a CMake description file (CMakeLists.txt), a technical file for CMake (toolchain.cmake) and a container package (usually called <Project>Sys).

The CMT description file (project.cmt)

The project.cmt file is located in the directory cmt under the top level directory of the project. It contains the name of the project, the projects it depends on and some configuration options. This file will become obsolete once we are fully migrated to CMake

An example of project.cmt is:

    1project LHCB
    3use GAUDI GAUDI_v23r8
    4use DBASE
    5use PARAM
    7build_strategy with_installarea
    8setup_strategy root

The name of the project must appear in uppercase letters (line 1). The dependencies on other projects should include the version of the project (if any) in the form <PROJECT>_vXrY (line 3).

The CMake description file (CMakeLists.txt)

The CMakeLists.txt file is located in the top level directory of the project. It is equivalent to cmt/project.cmt and should be kept synchronised with it, it describes the project structure and dependencies for use by the CMake build tools. It contains the name of the project (line 9, capitalised lower case), the projects it depends on (line 10), and any data packages used by packages contained in the project (lines 11-14).

An example of CMakeLists.txt is:

    4# Load macros and functions for Gaudi-based projects
    8# Declare project name and version
    9gaudi_project(LHCb v36r0
   10              USE Gaudi v23r8
   11              DATA Gen/DecFiles
   12                   Det/SQLDDDB VERSION v7r*
   13                   FieldMap
   14                   TCK/HltTCK
   15                   TCK/L0TCK VERSION v4r*)

The toolchain.cmake file

This is a technical file needed to bootstrap CMake. It is the same for all projects, so can be copied from another project when creating the project, and does not need to be touched again

The Container Package

The container package is a simple CMT package used to define the list of packages (with their version) that are part of the project. It is also used to keep some global release notes and the configuration file to produce the Doxygen documentation.

An example of requirements file for the container package can be something like

    1package LHCbSys
    2version v28r5
    4branches doc cmt
    6# Packages
    7use Package1 v1r2 Hat
    8# ...
   10# Declare this as a container package
   11apply_pattern container_package
   13# Allow the generation of QMTest summary 
   14apply_pattern QMTestSummarize
Lines 11 and 13 are mandatory (for the moment) for a correct build and test of the project.

Note that the name of a package must be unique among all the packages in all the projects.

Repository Structure and Tags

As described in GaudiSVNRepository, the Subversion repository contains one top-level directory per project with the same name of the project (correct case). That directory features the three standard directories trunk, tags and branches.

The trunk directory contains a complete image of the project main development version. It contains the cmt directory, with the latest revision of the file project.cmt, and all the packages belonging to the project, starting from the container package.

The packages have their own tags in the tags directory under a sub-directory with the same name of the package (e.g. $GAUDISVN/Gaudi/tags/GaudiKernel/v27r7).

The project tags have the format <PROJECT>_vXrY and are under tags/<PROJECT>. The project tags is basically a tag of the project cmt directory (e.g. $GAUDISVN/Gaudi/tags/GAUDI/GAUDI_v21r7/cmt), but it can include the actual versions of all the packages (copies from their tags as in, e. g., the tag of Gaudi).

Note that the container package and the project must be tagged with the same version (e.g. tags/LHCbSys/v36r0 and tags/LHCB/LHCB_v36r0). If the project contains an application, also the application package should normally be tagged with the same version as the project.

Adding a New Project

For the Project Manager

  • Create the project structure in the repository (tcsh)
    • prepare the structure in a local directory
set proj = Newproject
set PROJ = `echo $proj | tr a-z A-Z`
svn co -N svn+ssh://
cd lhcb
svn mkdir $proj $proj/trunk $proj/tags $proj/branches $proj/trunk/cmt $proj/tags/$PROJ
    • create the file $proj/trunk/cmt/project.cmt with a content like
project $PROJ

# Add one or more lines for the project dependencies, dependency on LHCB_v36r0 given as an example
use LHCB LHCB_v36r0

build_strategy with_installarea
setup_strategy root
    • create the file $proj/trunk/CMakeLists.txt with a content like

# Load macros and functions for Gaudi-based projects

# Declare project name and version and dependencies (LHCB v36r0 given as example)
gaudi_project($proj v1r0
              USE LHCb v36r0)
    • create the file $proj/trunk/toolchain.cmake by copying it from another project
cp $LHCBRELEASES/LHCB/LHCB_v36r0/toolchain.cmake $proj/trunk/toolchain.cmake
    • put the files project.cmt, CMakeLists.txt and toolchain.cmake under the control of Subversion, commit and remove the temporary directory
svn add $proj/trunk/cmt/project.cmt
svn add $proj/trunk/CMakeLists.txt
svn add $proj/trunk/toolchain.cmake
cd ..
svn ci -m "Project structure for project $proj" lhcb
rm -rf lhcb
  • Create the container package <Project>Sys following the instructions at CreateNewPackageSVN.
    • ensure that the package contains the files release.notes, DoxyFile.cfg and MainPage.h in doc
  • Add both the project and the package to the projects and packages property of the repository:
svn co -N svn+ssh://
svn propedit projects lhcb
svn ci -m "Added the project NewProject to the list of projects" lhcb
rm -rf lhcb
The instructions for the packages property are described in CreateNewPackageSVN.

For the Librarian

  • The creation of a new project needs a full new release of the LbScripts project. It cannot be dynamically added (yet):
  • The project name has to be added to $LBCONFIGURATIONROOT/python/LbConfiguration/ This will ensure the proper support for the various aliases for the project. If the Project name length is > 6 then adjust the AFS volume main name in that same file. This will be the name used for the volume of each release of the new project.
  • create an afs volume called <PROJECT> in $LHCBTAR. Do not forget to add the correct ACLs, including system:anyuser read
  • create directory called <PROJECT> in $LHCBRELEASES. Do not forget to add the correct ACLs, including system:anyuser read
  • Add the project to the DOC directories: see and ask the AFS administrator to add the project manager to the AFS group

Deprecated: This step used to be necessary but the role of this scripts is now performed by

  • For backward compatibility with, the file $LBLEGACYROOT/python/LbLegacy/ has to be edited. The project name has to be added to its internal list.
Edit | Attach | Watch | Print version | History: r15 | r13 < r12 < r11 < r10 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r11 - 2013-06-26 - MarcoCattaneo
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback