]> git.uio.no Git - u/mrichter/AliRoot.git/blame - README_CMake
Coverity
[u/mrichter/AliRoot.git] / README_CMake
CommitLineData
45526b5e 1
2Note: The CMake build of AliRoot builds out-of-source
3
529dfa42 4Steps to Build AliRoot with CMake :
dfa85384 5
8b0f7d96 61. Check out Aliroot source into a folder (usually specified by the environment variable ALICE)
45526b5e 7
8b0f7d96 8 cd $ALICE
9 svn co http://alisoft.cern.ch/AliRoot/trunk AliRoot
529dfa42 10
8b0f7d96 112. Set the environment variable ALICE_ROOT to point to the source you have checked out
12
13 cd AliRoot
14 export ALICE_ROOT=`pwd`
15
16
173. Create a new folder where the build will take place. It must be different from the source directory!
45526b5e 18
8b0f7d96 19 cd ..
20 mkdir objdir
21 cd objdir
22
234. Optionally specify the place for installation using the environment variable ALICE_INSTALL.
24It you do not specify it, "make install" will put lib, bin and include in ALICE_ROOT
25
265. Optionally specify the location of Geant3 using the environment variable GEANT3DIR
27
286. Execute the following commands to configure the build
29
30 cmake $ALICE_ROOT
31
32Note: Some files CMakeLists.txt will be created in the source tree, so you need write access there. This
33is a temporary situation that will change soon.
34
357. Build and install AliRoot. Note that the parralel build is fully operational with CMake.
36
37 make -j4
38 make install
529dfa42 39
8b0f7d96 40If you make changes in the source tree, it is enough to do
45526b5e 41
8b0f7d96 42 make
43 make install
529f129e 44
8b0f7d96 45to get them in use.
529dfa42 46
8b0f7d96 479. In order to build addtional targets like THydjet and SHUTTLE add the following options to the cmake command
45526b5e 48
49 cmake -DTHydjet=ON -DSHUTTLE=ON <path_to_source>
50
8b0f7d96 5110. Static libraries can be built using
529f129e 52
53 make alilibs-static
54
8b0f7d96 5511. Individual Modules can be built using
529f129e 56
57 make <Module>-all
58 make <Module>-all-static
59
60eg. make STEER-all STEER-all-static
61
8b0f7d96 6212. Individual Packages can be built using
529f129e 63
64 make <Package>
65 make <Package>-static
66
67eg. make STEERbase STEERbase-static
529dfa42 68
8b0f7d96 6913. The code can be checked for the ALICE coding conventions on a package, module or class level using the following targets.
c2a2c0b8 70
71 make check-all
72 make <Module>-check-all
73 make <Package>-check
8948a174 74 make <Module>-<ClassName>-check // To use this run cmake with -DCLASSCHECK="YES" option. It is turned off by default since it bloats the Makefile and slows down the internal makefile rule checking
c2a2c0b8 75
811ffdcc 76 The resulting violations will be written to the folder <Build_Directory>/<Module>/check/viols
c2a2c0b8 77
8b0f7d96 7814. To Build PARs the following targets can be used. The resulting packages will be created in the cmake build directory
6a9e2760 79
80 make par-all
81 make <Package>.par
8948a174 82 make <Module>-par-all //build all par packages in the module
3a8dbb31 83
8b0f7d96 8415. To test PARs after building run
3a8dbb31 85
86 make test-par-all
87 make test-<Package>
88 make test-<Module>-par-all
6a9e2760 89
45526b5e 90!IMPORTANT! - Make sure your source folder is clean. If you used the old make system to build aliroot run make clean in the source directory before you run cmake
529dfa42 91
dfa85384 92