]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - CMakeLists.txt
PMD DAs
[u/mrichter/AliRoot.git] / CMakeLists.txt
index 6bddca4e6e89f4c018fac5a899ed5aeed2a438a5..a30cf21336388d5ef9d0fbfd542b373123e02cbd 100644 (file)
@@ -31,6 +31,51 @@ include(CheckCompiler)
 # ROOT dictionaries and maps
 include(CMakeALICE)
 
+# Checking first for DIM, DATE, AMORE and daqDA 
+# in case ROOT Extra static library needs to be enabled
+
+# DATE
+if(DATE_CONFIG)
+    find_package(DATE)
+endif(DATE_CONFIG)
+
+# daqDA
+if(daqDA)
+    find_package(daqDA)
+endif(daqDA)
+
+# AMORE
+if(AMORE_CONFIG)
+    find_package(AMORE)
+endif(AMORE_CONFIG)
+
+# DA is enabled
+if(DA)
+    if(NOT DIMDIR AND NOT ODIR)
+        set(DA FALSE)
+        message(FATAL_ERROR "Das enabled but no DIMDIR and ODIR set. Please set DIMDIR to DIM installation and ODIR to platform (default linux)")
+    endif()
+
+    if(NOT DATE_FOUND)
+        set(DA FALSE)
+        message(FATAL_ERROR "DAs enabled but no DATE support found. Please point to your date installation using \"DATE_CONFIG\" variable")
+    endif()
+
+    if(NOT daqDA_FOUND)
+        set(DA FALSE)
+        message(FATAL_ERROR "DAs enabled but no daqDA support found. Please point to your daqDA installation using \"daqDA\" variable")
+    endif()
+
+    if(NOT AMORE_FOUND)
+        set(DA FALSE)
+        message(FATAL_ERROR "DAs enabled but no AMORE support found. Please point to your AMORE installation using \"AMORE_CONFIG\" variable")
+    endif()
+    
+    # Enable static libraries
+    set(ALIROOT_STATIC TRUE)
+    message(STATUS "DAs enabled")
+endif(DA)
+
 # ROOT configuration mandatory
 if(ROOTSYS)
     find_package(ROOT REQUIRED)
@@ -59,12 +104,36 @@ check_language(Fortran)
 if(CMAKE_Fortran_COMPILER)
     enable_language(Fortran OPTIONAL)
 else()
-    message("No Fortran support. Disabling LHAPDF, PHYTIA6, MICROCERN")
+    message(STATUS "No Fortran support. Disabling LHAPDF, PHYTIA6, MICROCERN, etc.")
 endif()
 
 
 # DATE
-find_package(DATE)
+if(DATE_CONFIG)
+    find_package(DATE)
+endif(DATE_CONFIG)
+
+# daqDA
+if(daqDA)
+    find_package(daqDA)
+endif(daqDA)
+
+# DA is enabled
+if(DA)
+    if(NOT DATE_FOUND)
+        set(DA FALSE)
+        message(FATAL_ERROR "DAs enabled but no DATE support found. Please point to your date installation using \"DATE_CONFIG\"")
+    endif()
+    
+    if(NOT daqDA_FOUND)
+        set(DA FALSE)
+        message(FATAL_ERROR "DAs enabled but no daqDA support found. Please point to your daqDA installation using \"daqDA\" variable")
+    endif()
+    
+    # Enable static libraries
+    set(ALIROOT_STATIC TRUE)
+    message(STATUS "DAs enabled")
+endif(DA)
 
 # FastJet
 find_package(FASTJET)
@@ -111,6 +180,7 @@ add_subdirectory(HLT)
 add_subdirectory(HMPID)
 add_subdirectory(ITS)
 add_subdirectory(JETAN)
+add_subdirectory(MFT)
 add_subdirectory(MONITOR)
 add_subdirectory(MUON)
 add_subdirectory(OADB)
@@ -121,6 +191,9 @@ add_subdirectory(STARLIGHT)
 add_subdirectory(STAT)
 add_subdirectory(STRUCT)
 add_subdirectory(T0)
+add_subdirectory(TDPMjet)
+add_subdirectory(TEvtGen)
+add_subdirectory(THerwig)
 add_subdirectory(TOF)
 add_subdirectory(TPC)
 add_subdirectory(TRD)
@@ -131,6 +204,9 @@ add_subdirectory(ZDC)
 
 # Fortran modules
 if(CMAKE_Fortran_COMPILER)
+  add_subdirectory(DIME)
+  add_subdirectory(DPMJET)
+  add_subdirectory(HERWIG)
   add_subdirectory(HIJING)
   add_subdirectory(LHAPDF)
   add_subdirectory(MICROCERN)
@@ -141,6 +217,7 @@ if(CMAKE_Fortran_COMPILER)
   add_subdirectory(THydjet)
   add_subdirectory(TPHIC)
   add_subdirectory(TUHKMgen)
+  add_subdirectory(TAmpt)
 endif(CMAKE_Fortran_COMPILER)
 
 # Enable SHUTTLE compilation
@@ -152,3 +229,5 @@ if(SHUTTLE)
         message(FATAL_ERROR "SHUTTLE enabled! Please specify DIMDIR, ODIR and ALIEN")
     endif()
 endif(SHUTTLE)
+
+add_subdirectory(ALIROOT)