]> git.uio.no Git - u/mrichter/AliRoot.git/blob - README_CMake
some coverity warnings fixed
[u/mrichter/AliRoot.git] / README_CMake
1
2 Note: The CMake build of AliRoot builds out-of-source
3
4 Steps to Build AliRoot with CMake :
5
6 1. Check out Aliroot source into a folder (usually specified by the environment variable ALICE)
7         
8         cd $ALICE
9         svn co https://alisoft.cern.ch/AliRoot/trunk AliRoot
10
11 Note: Please use https:// if you want to be able to commit changes to the SVN repository.
12
13 2. Set the environment variable ALICE_ROOT to point to the source you have checked out
14
15        cd AliRoot
16        export ALICE_ROOT=`pwd`
17
18
19 3. Create a new folder where the build will take place. It must be different from the source directory!
20         
21         cd ..
22         mkdir objdir
23         cd objdir
24
25 4. Optionally specify the place for installation using the environment variable ALICE_INSTALL.
26 It you do not specify it, "make install" will put lib, bin and include in ALICE_ROOT
27
28 5. Optionally specify the location of Geant3 using the environment variable GEANT3DIR
29
30 6. Execute the following commands to configure the build
31
32         cmake $ALICE_ROOT
33
34 Note: Some files CMakeLists.txt will be created in the source tree, so you need write access there. This 
35 is a temporary situation that will change soon.
36
37 7. Build and install AliRoot. Note that the parralel build is fully operational with CMake.
38
39          make -j4
40          make install
41
42 If you make changes in the source tree, it is enough to do
43
44          make
45          make install
46
47 to get them in use.
48
49 9. In order to build addtional targets like THydjet and SHUTTLE add the following options to the cmake command
50
51         cmake -DTHydjet=ON -DSHUTTLE=ON <path_to_source>
52
53 10. Static libraries can be built using
54
55         make alilibs-static
56
57 11. Individual Modules can be built using
58
59         make <Module>-all
60         make <Module>-all-static 
61
62 eg.     make STEER-all STEER-all-static
63
64 12. Individual Packages can be built using
65
66         make <Package>
67         make <Package>-static
68
69 eg.     make STEERbase STEERbase-static
70
71 13. The code can be checked for the ALICE coding conventions on a package, module or class level using the following targets. 
72
73   make check-all
74   make <Module>-check-all
75   make <Package>-check
76   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
77
78   The resulting violations will be written to the folder <Build_Directory>/<Module>/check/viols
79
80 14. To Build PARs the following targets can be used. The resulting packages will be created in the cmake build directory
81
82   make par-all 
83   make <Package>.par
84   make <Module>-par-all   //build all par packages in the module
85
86 15. To test PARs after building run
87
88   make test-par-all
89   make test-<Package>
90   make test-<Module>-par-all
91
92 !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
93  
94