X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=README_CMake;h=df5457d20ef19bdf0c5b7f515b18e49051856554;hb=cb15f5057a69750da53f4cdc2cbd3f07560d403f;hp=fb0eec9f3e0f7d4606251f1212439b269676ab7b;hpb=529dfa428b4a62d2695e2e970e385e7686358551;p=u%2Fmrichter%2FAliRoot.git diff --git a/README_CMake b/README_CMake index fb0eec9f3e0..df5457d20ef 100644 --- a/README_CMake +++ b/README_CMake @@ -1,20 +1,94 @@ + +Note: The CMake build of AliRoot builds out-of-source + Steps to Build AliRoot with CMake : -1. Define environment variable ALICE_INSTALL - export ALICE_INSTALL=$ALICE/AliRootInstall +1. Check out Aliroot source into a folder (usually specified by the environment variable ALICE) + + cd $ALICE + svn co https://alisoft.cern.ch/AliRoot/trunk AliRoot + +Note: Please use https:// if you want to be able to commit changes to the SVN repository. + +2. Set the environment variable ALICE_ROOT to point to the source you have checked out + + cd AliRoot + export ALICE_ROOT=`pwd` + + +3. Create a new folder where the build will take place. It must be different from the source directory! + + cd .. + mkdir objdir + cd objdir + +4. Optionally specify the place for installation using the environment variable ALICE_INSTALL. +It you do not specify it, "make install" will put lib, bin and include in ALICE_ROOT + +5. Optionally specify the location of Geant3 using the environment variable GEANT3DIR + +6. Execute the following commands to configure the build + + cmake $ALICE_ROOT + +Note: Some files CMakeLists.txt will be created in the source tree, so you need write access there. This +is a temporary situation that will change soon. + +7. Build and install AliRoot. Note that the parralel build is fully operational with CMake. + + make -j4 + make install + +If you make changes in the source tree, it is enough to do + + make + make install + +to get them in use. + +9. In order to build addtional targets like THydjet and SHUTTLE add the following options to the cmake command + + cmake -DTHydjet=ON -DSHUTTLE=ON + +10. Static libraries can be built using + + make alilibs-static + +11. Individual Modules can be built using + + make -all + make -all-static + +eg. make STEER-all STEER-all-static + +12. Individual Packages can be built using + + make + make -static + +eg. make STEERbase STEERbase-static + +13. The code can be checked for the ALICE coding conventions on a package, module or class level using the following targets. + + make check-all + make -check-all + make -check + make --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 + + The resulting violations will be written to the folder //check/viols + +14. To Build PARs the following targets can be used. The resulting packages will be created in the cmake build directory -2. Set Path to point to binaries and libraries that will be built in ALICE_INSTALL - export PATH=$PATH:$ALICE_INSTALL/bin/tgt_${ALICE_TARGET} - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ALICE_INSTALL/lib/tgt_${ALICE_TARGET} + make par-all + make .par + make -par-all //build all par packages in the module -3. Execute the following commands to build AliRoot - cd $ALICE_INSTALL - cmake - make +15. To test PARs after building run -4. In order to build addtional targets like TFluka, THydjet and SHUTTLE add the following options to the cmake command - cmake -DTFLUKA=ON -DTHYDJET=ON -DSHUTTLE=ON + make test-par-all + make test- + make test--par-all -!IMPORTANT! : Make sure you delete all the files in your ALICE_INSTALL directory before you generate the Makefile again to clear the CMakeCache or the generated build system may not function properly. +!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