recMC.C submitMC.sh
[u/mrichter/AliRoot.git] / CMakeLists.txt
CommitLineData
e969a926 1# -*- mode: cmake -*-
e969a926 2
3# Check if cmake has the required version
4Cmake_Minimum_Required(VERSION 2.6 FATAL_ERROR)
5
6# Set name of our project to AliRoot. To be done after check of cmake version
f7d3fd75 7Project(AliRoot NONE)
e969a926 8
9# Set AliRoot variables
10Set(ALICE_ROOT $ENV{ALICE_ROOT})
11Set(ALICE $ENV{ALICE})
12Set(ALICE_STATIC_BUILD ON CACHE BOOL "Build also statics libs")
13
14#Set(CMAKE_VERBOSE_MAKEFILE ON)
15
16# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/
17Set(CMAKE_MODULE_PATH "${ALICE_ROOT}/cmake/modules")
18
f7d3fd75 19# To fix a hack that has been introduced for the Mac
20If(APPLE)
21 Set(CMAKE_INSTALL_NAME_TOOL CMAKE_INSTALL_NAME_TOOL-NOTFOUND)
22Endif(APPLE)
23
24
25# Setup ROOT
26Find_package(ROOT 5.0.0 REQUIRED)
27
28Set(CMAKE_C_COMPILER $ENV{CC})
29Enable_Language(C)
30
31Set(CMAKE_CXX_COMPILER $ENV{CXX})
32Enable_Language(CXX)
33
34Set(CMAKE_Fortran_COMPILER $ENV{F77})
35Enable_Language(Fortran)
36
e969a926 37# Load some basic macros which are needed later on
38#Include(WriteConfigFile)
39Include(Dart)
40Include(ALICEMacros)
41
42# Check if the user wants to build the project in the source directory
43Check_out_of_Source_Build()
44
45# searches for needed packages
46
e969a926 47Set(ALIROOT_INSTALL_DIR ${ALICE_ROOT}/${ALICE_TARGET})
48
49# Setup GEANT3
50Find_package(GEANT3 REQUIRED)
51
52# Setup RuleChecker
53Find_Package(RuleChecker)
54
55# Check if DATE is installed
56Find_Package(DATE)
57
58# Setup system dependent flags
59SetupSystem()
60
61# Set the library version in the main CMakeLists.txt
62SET(ALIROOT_MAJOR_VERSION 0)
63SET(ALIROOT_MINOR_VERSION 0)
64SET(ALIROOT_PATCH_VERSION 0)
65SET(ALIROOT_VERSION "${ALIROOT_MAJOR_VERSION}.${ALIROOT_MINOR_VERSION}.${ALIROOT_PATCH_VERSION}")
66SET(ALIROOT_LIBRARY_PROPERTIES ${ALIROOT_LIBRARY_PROPERTIES}
67 VERSION "${ALIROOT_VERSION}"
68 SOVERSION "${ALIROOT_MAJOR_VERSION}"
69 SUFFIX ".so"
70)
71
72# Set version variables
6455495f 73Find_program( READLINK_PROGRAM readlink)
74
75If(READLINK_PROGRAM)
76 Execute_process(COMMAND readlink -f ${ALICE_ROOT}
77 COMMAND xargs svn info
78 OUTPUT_VARIABLE _svn_out)
79Else(READLINK_PROGRAM)
80 Execute_process(COMMAND svn info ${ALICE_ROOT}
81 OUTPUT_VARIABLE _svn_out)
82Endif(READLINK_PROGRAM)
e969a926 83
84String(REGEX REPLACE "^.*Revision: ([^\n]*).*$" "\\1"
85 ALIROOT_SVN_REVISION ${_svn_out})
86String(REGEX REPLACE "^.*URL: https://alisoft.cern.ch/AliRoot/([^\n]*).*$" "w \\1"
87 ALIROOT_SVN_BRANCH ${_svn_out})
249caf77 88String(REPLACE "/" "\\\\/"
89 ALIROOT_SVN_BRANCH ${ALIROOT_SVN_BRANCH})
e969a926 90
91# Additional targets
92Add_Custom_Target(check-all COMMENT "Checking coding conventions")
93
94# Configure special include file
95If(UNIX)
96 Set(_in ${CMAKE_CURRENT_SOURCE_DIR}/STEER/ARVersion.h.in)
97 Set(_out ${CMAKE_CURRENT_BINARY_DIR}/STEER/ARVersion.h)
98 Add_custom_target(ARversion ALL
99 COMMAND sed < ${_in}
100 -e "s/\\@ALIROOT_SVN_REVISION\\@/${ALIROOT_SVN_REVISION}/"
101 -e "s/\\@ALIROOT_SVN_BRANCH\\@/${ALIROOT_SVN_BRANCH}/"
102 -e "s/\\@ALIROOT_VERSION\\@/${ALIROOT_VERSION}/" > ${_out})
103 Install(FILES ${_out} DESTINATION ${ALIROOT_INSTALL_DIR}/include)
104Endif(UNIX)
105
106# This would work, but just once... we want this to happen at every make
107# Configure_file(${CMAKE_CURRENT_SOURCE_DIR}/STEER/ARVersion.h.in
108#${CMAKE_CURRENT_BINARY_DIR}/STEER/ARVersion.h @ONLY)
109
110# Recurse into the given subdirectories. This does not actually
111# cause another cmake executable to run. The same process will walk through
112# the project's entire directory structure.
113
114#Add_subdirectory(PYTHIA8)
115#Add_subdirectory(TFluka)
116#Add_subdirectory(THydjet)
117
118Add_subdirectory(ACORDE)
119Add_subdirectory(ANALYSIS)
120Add_subdirectory(BCM)
121Add_subdirectory(CORRFW)
122Add_subdirectory(DPMJET)
123Add_subdirectory(EMCAL)
124Add_subdirectory(ESDCheck)
125Add_subdirectory(EVE)
126Add_subdirectory(EVGEN)
127Add_subdirectory(FASTSIM)
128Add_subdirectory(FMD)
e969a926 129Add_subdirectory(HERWIG)
130Add_subdirectory(HIJING)
131Add_subdirectory(HLT)
132Add_subdirectory(HMPID)
133Add_subdirectory(ITS)
134Add_subdirectory(JETAN)
135Add_subdirectory(LHAPDF)
136Add_subdirectory(LHC)
137Add_subdirectory(MICROCERN)
138Add_subdirectory(MONITOR)
139Add_subdirectory(MUON)
140Add_subdirectory(PHOS)
141Add_subdirectory(PMD)
142Add_subdirectory(PWG0)
143Add_subdirectory(PWG1)
144Add_subdirectory(PWG2)
145Add_subdirectory(PWG3)
146Add_subdirectory(PWG4)
147Add_subdirectory(PYTHIA6)
148Add_subdirectory(RALICE)
149Add_subdirectory(RAW)
150Add_subdirectory(STAT)
151Add_subdirectory(STEER)
152Add_subdirectory(STRUCT)
153Add_subdirectory(T0)
154Add_subdirectory(TDPMjet)
155Add_subdirectory(TEPEMGEN)
156Add_subdirectory(THbtp)
157Add_subdirectory(THerwig)
158Add_subdirectory(THijing)
ddd9c299 159#Add_subdirectory(TIsajet)
e969a926 160Add_subdirectory(TOF)
161Add_subdirectory(TPC)
162Add_subdirectory(TPHIC)
163Add_subdirectory(TRD)
164Add_subdirectory(TTherminator)
165Add_subdirectory(VZERO)
166Add_subdirectory(ZDC)
167
168Add_subdirectory(ALIROOT)
169