Additional libraries to link hltdimserver
[u/mrichter/AliRoot.git] / CMakeLists.txt
CommitLineData
d50827fc 1# **************************************************************************
2# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
3# * *
4# * Author: The ALICE Off-line Project. *
5# * Contributors are mentioned in the code where appropriate. *
6# * *
7# * Permission to use, copy, modify and distribute this software and its *
8# * documentation strictly for non-commercial purposes is hereby granted *
9# * without fee, provided that the above copyright notice appears in all *
10# * copies and that both the copyright notice and this permission notice *
11# * appear in the supporting documentation. The authors make no claims *
12# * about the suitability of this software for any purpose. It is *
13# * provided "as is" without express or implied warranty. *
14# **************************************************************************
15
16#--------------------------------------------------------------------------#
17# Set Basic CMake Configuration #
18#--------------------------------------------------------------------------#
e969a926 19
cbd58b9c 20cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
e969a926 21
d50827fc 22project(AliRoot CXX C)
bf4c2121 23
d50827fc 24# Path to additonal modules
f72dcc4f 25set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
b22a7396 26
27# - CLANG_MAJOR.CLANG_MINOR or
28# - GCC_MAJOR.GCC_MINOR.GCC_PATCH
29include(CheckCompiler)
30
31# ROOT dictionaries and maps
d50827fc 32include(CMakeALICE)
6db31708 33
d50827fc 34# ROOT configuration mandatory
35if(ROOTSYS)
36 find_package(ROOT REQUIRED)
234c484d 37
38 # ROOT must be build with XML2 support
39 if(ROOT_HASXML STREQUAL "no")
40 message(FATAL_ERROR "ROOT was not build with xml2 support. Please reinstall or rebuild ROOT with xml2 support")
41 endif(ROOT_HASXML STREQUAL "no")
d50827fc 42else()
43 message(FATAL_ERROR "ROOT installation not found!\nPlease point to the ROOT installation using -DROOTSYS=ROOT_INSTALL_DIR")
44endif(ROOTSYS)
6db31708 45
1dbe1076 46# If no Fortran, i.e on Windows
47# We need to specify ROOT fortran
48# (f95 comes before gfortran in default module)
49include(CheckLanguage)
50
51if(ROOT_FORTRAN)
52 message(STATUS "Using the Fortran compiler defined by ROOT configuration: ${ROOT_FORTRAN}")
53 set(CMAKE_Fortran_COMPILER ${ROOT_FORTRAN})
54else()
55 message(STATUS "Using default system Fortran compiler")
56endif(ROOT_FORTRAN)
57
58check_language(Fortran)
59if(CMAKE_Fortran_COMPILER)
60 enable_language(Fortran OPTIONAL)
61else()
64609fcd 62 message("No Fortran support. Disabling LHAPDF, PHYTIA6, MICROCERN, etc.")
1dbe1076 63endif()
64
65
56966a5e 66# DATE
67find_package(DATE)
68
b5576c4e 69# FastJet
70find_package(FASTJET)
71
3c77e1ef 72# ZEROMQ
73find_package(ZeroMQ)
74
b22a7396 75# AliRoot version extracted from Git repository
76# Sets 4 git variables
d37e8011 77# - GIT_REFSPEC - complete name of the current reference
78# - ALIROOT_BRANCH - name of the branch or tag extracted from the current reference
79# - GIT_SHA1 - current hash in the long format
80# - GIT_SHORT_SHA1 - current hash in the short format
b22a7396 81include(CheckGitVersion)
6db31708 82
d50827fc 83message(STATUS "CMake platform: ${CMAKE_SYSTEM}")
84message(STATUS "Build folder: ${AliRoot_BINARY_DIR}")
85message(STATUS "Source folder: ${AliRoot_SOURCE_DIR}")
86message(STATUS "Installation folder: ${CMAKE_INSTALL_PREFIX}")
87
88
63697604 89# AliRoot base modules
17f9c1f8 90add_subdirectory(STEER)
17f9c1f8 91add_subdirectory(RAW)
63697604 92add_subdirectory(ANALYSIS)
93
94# Include Vc own cmake
95include(Vc/Vc.cmake)
96add_subdirectory(Vc)
97
98# AliRoot modules
99add_subdirectory(ACORDE)
100add_subdirectory(AD)
101add_subdirectory(BCM)
102add_subdirectory(CORRFW)
103add_subdirectory(EMCAL)
9d62600c 104add_subdirectory(EPOS)
63697604 105add_subdirectory(EVE)
106add_subdirectory(EVGEN)
107add_subdirectory(FASTSIM)
108add_subdirectory(FIT)
109add_subdirectory(FMD)
110add_subdirectory(HLT)
111add_subdirectory(HMPID)
17f9c1f8 112add_subdirectory(ITS)
63697604 113add_subdirectory(JETAN)
80afaccc 114add_subdirectory(MFT)
63697604 115add_subdirectory(MONITOR)
116add_subdirectory(MUON)
117add_subdirectory(OADB)
118add_subdirectory(PHOS)
119add_subdirectory(PMD)
a31c2f7d 120add_subdirectory(PYTHIA8)
63697604 121add_subdirectory(STARLIGHT)
122add_subdirectory(STAT)
123add_subdirectory(STRUCT)
97e8d2a8 124add_subdirectory(T0)
72017ac8 125add_subdirectory(TDPMjet)
e706c082 126add_subdirectory(TEvtGen)
16765dcc 127add_subdirectory(THerwig)
97e8d2a8 128add_subdirectory(TOF)
63697604 129add_subdirectory(TPC)
97e8d2a8 130add_subdirectory(TRD)
25f88fb9 131add_subdirectory(TRIGGER)
63697604 132add_subdirectory(TTherminator)
133add_subdirectory(VZERO)
134add_subdirectory(ZDC)
67018bf4 135
63697604 136# Fortran modules
1dbe1076 137if(CMAKE_Fortran_COMPILER)
c462af85 138 add_subdirectory(DIME)
139 add_subdirectory(DPMJET)
64609fcd 140 add_subdirectory(HERWIG)
63697604 141 add_subdirectory(HIJING)
116e4267 142 add_subdirectory(LHAPDF)
116e4267 143 add_subdirectory(MICROCERN)
63697604 144 add_subdirectory(PYTHIA6)
ba812042 145 add_subdirectory(TEPEMGEN)
27b08c46 146 add_subdirectory(THbtp)
a95d9137 147 add_subdirectory(THijing)
63697604 148 add_subdirectory(THydjet)
149 add_subdirectory(TPHIC)
150 add_subdirectory(TUHKMgen)
9b863d49 151 add_subdirectory(TAmpt)
1dbe1076 152endif(CMAKE_Fortran_COMPILER)
67018bf4 153
67018bf4 154# Enable SHUTTLE compilation
155# Check if DIMDIR and ODIR are set
156if(SHUTTLE)
157 if(DIMDIR AND ODIR AND ALIEN)
158 add_subdirectory(SHUTTLE)
159 else()
160 message(FATAL_ERROR "SHUTTLE enabled! Please specify DIMDIR, ODIR and ALIEN")
161 endif()
162endif(SHUTTLE)
034aa4b3 163
164add_subdirectory(ALIROOT)