]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - CMakeLists.txt
Putting PMT default gain as for p-p to prevent null signal in case of unforeseen...
[u/mrichter/AliRoot.git] / CMakeLists.txt
index e0b620831f1c7d2508f6e4d77d7847d37d11145a..8390d538add818018b05d94754c9fe3dc64990e5 100644 (file)
@@ -21,6 +21,23 @@ cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR)
 
 project(AliRoot CXX C)
 
+message(STATUS "CMake platform: ${CMAKE_SYSTEM}")
+message(STATUS "Build folder: ${AliRoot_BINARY_DIR}")
+message(STATUS "Source folder: ${AliRoot_SOURCE_DIR}")
+message(STATUS "Installation folder: ${CMAKE_INSTALL_PREFIX}")
+
+# You can change the build type using 
+# cmake -DCMAKE_BUILD_TYPE=DEBUG | RELEASE | RELWITHDEBINFO | MINSIZEREL ...
+if (NOT CMAKE_BUILD_TYPE)
+  set(CMAKE_BUILD_TYPE RELWITHDEBINFO)
+endif(NOT CMAKE_BUILD_TYPE)
+message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
+
+
+if(CMAKE_INSTALL_PREFIX STREQUAL "${AliRoot_SOURCE_DIR}")
+    message(FATAL_ERROR "Please choose a different installation point than the source tree!")
+endif()
+
 # Path to additonal modules
 set(CMAKE_MODULE_PATH "${AliRoot_SOURCE_DIR}/cmake")
 
@@ -38,11 +55,10 @@ include(CheckGitVersion)
 #       - GCC_MAJOR.GCC_MINOR.GCC_PATCH
 include(CheckCompiler)
 
-# You can change the build type using 
-# cmake -DCMAKE_BUILD_TYPE=DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL...
-if (NOT CMAKE_BUILD_TYPE)
-  set(CMAKE_BUILD_TYPE RELWITHDEBINFO)
-endif(NOT CMAKE_BUILD_TYPE)
+# Shared library suffix
+if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
+  set(CMAKE_SHARED_LIBRARY_SUFFIX .so)
+endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
 
 # ROOT dictionaries and maps
 include(CMakeALICE)
@@ -74,6 +90,13 @@ if(AMORE_CONFIG)
     endif()
 endif(AMORE_CONFIG)
 
+# id DARPM we enable DA if it is not set
+if(DARPM)
+    if(NOT DA)
+        set(DA ON)
+    endif(NOT DA)
+endif(DARPM)
+
 # DA is enabled
 if(DA)
     if(NOT DIMDIR AND NOT ODIR)
@@ -171,11 +194,6 @@ find_package(FASTJET)
 # ZEROMQ
 find_package(ZeroMQ)
 
-message(STATUS "CMake platform: ${CMAKE_SYSTEM}")
-message(STATUS "Build folder: ${AliRoot_BINARY_DIR}")
-message(STATUS "Source folder: ${AliRoot_SOURCE_DIR}")
-message(STATUS "Installation folder: ${CMAKE_INSTALL_PREFIX}")
-
 # General flags -> Should be moved into a configuration file
 set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
 set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE)
@@ -189,6 +207,9 @@ add_subdirectory(ANALYSIS)
 include(Vc/Vc.cmake)
 add_subdirectory(Vc)
 
+# AliRoot common macros
+add_subdirectory(macros)
+
 # AliRoot modules
 add_subdirectory(ACORDE)
 add_subdirectory(AD)
@@ -247,17 +268,29 @@ endif(CMAKE_Fortran_COMPILER)
 
 # PWG libraries
 add_subdirectory(PWG)
+add_subdirectory(PWGCF)
 # Depends on PWGCF - To fix dependencies
 add_subdirectory(PWGGA)
-# Depends on CF and LF - To fix the dependencies
+# Depends on CF  - To fix the dependencies
 add_subdirectory(PWGDQ)
+add_subdirectory(PWGHF)
+# Depends on CF
+add_subdirectory(PWGJE)
 add_subdirectory(PWGLF)
-# Depends on PP - To fix depedencies
+add_subdirectory(PWGPP)
 add_subdirectory(PWGUD)
+add_subdirectory(data)
+add_subdirectory(GRP)
+add_subdirectory(OCDB)
+add_subdirectory(QAref)
 
 # Enable SHUTTLE compilation
 # Check if DIMDIR and ODIR are set
 if(SHUTTLE)
+    if(ROOT_HASALIEN STREQUAL "no")
+       message(FATAL_ERROR "Shuttle needs ROOT build with AliEn support. Please build ROOT with AliEn support. Do not forget to set ALIEN to your AliEn installation")
+    endif()
+    
     if(DIMDIR AND ODIR AND ALIEN)
         add_subdirectory(SHUTTLE)
     else()