X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=CMakeLists.txt;h=bf9e2c1ab31b68a0f3bc6303fe6d6b664bcabaf3;hb=51e8669770770df2bf2aa81fcf3d98faad8cfd60;hp=ea522245a931309e400b0166f31d80c5de74829b;hpb=04484146da57b37aecbe21406b38a1dd89835c20;p=u%2Fmrichter%2FAliRoot.git diff --git a/CMakeLists.txt b/CMakeLists.txt index ea522245a93..bf9e2c1ab31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,14 @@ 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() @@ -47,14 +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) - -# ROOT dictionaries and maps -include(CMakeALICE) +# Shared library suffix +if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) + set(CMAKE_SHARED_LIBRARY_SUFFIX .so) +endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) # Checking first for DIM, DATE, AMORE and daqDA # in case ROOT Extra static library needs to be enabled @@ -83,6 +87,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) @@ -117,6 +128,8 @@ if(MDCRPM) endif(MDCRPM) # ROOT configuration mandatory +# FindRoot has to be after the enabling of DA due to libRootExtra +# Do not put it above DA if(ROOTSYS) find_package(ROOT REQUIRED) @@ -128,6 +141,10 @@ else() message(FATAL_ERROR "ROOT installation not found!\nPlease point to the ROOT installation using -DROOTSYS=ROOT_INSTALL_DIR") endif(ROOTSYS) +# ROOT dictionaries and maps +include(CMakeALICE) + + # If no Fortran, i.e on Windows # We need to specify ROOT fortran # (f95 comes before gfortran in default module) @@ -147,32 +164,14 @@ else() message(STATUS "No Fortran support. Disabling LHAPDF, PHYTIA6, MICROCERN, etc.") endif() -# 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) +# Optional: Doxygen for reference doc generation +find_package(Doxygen) +if(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND) + message(STATUS "Doxygen ${DOXYGEN_VERSION} and Graphviz found: ${DOXYGEN_EXECUTABLE}, ${DOXYGEN_DOT_EXECUTABLE}") + set(CAN_GENERATE_DOC TRUE) +else() + message(STATUS "Doxygen and Graphviz not found. Disabling support for documentation generation") +endif(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND) # FastJet find_package(FASTJET) @@ -180,6 +179,10 @@ find_package(FASTJET) # ZEROMQ find_package(ZeroMQ) +# Generating the AliRoot-config.cmake file +configure_file(${PROJECT_SOURCE_DIR}/cmake/AliRoot-config.cmake.in ${CMAKE_BINARY_DIR}/version/AliRoot-config.cmake @ONLY) +install(FILES ${PROJECT_BINARY_DIR}/version/AliRoot-config.cmake DESTINATION etc) + # General flags -> Should be moved into a configuration file set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE) @@ -193,11 +196,13 @@ add_subdirectory(ANALYSIS) include(Vc/Vc.cmake) add_subdirectory(Vc) +# AliRoot common macros +add_subdirectory(macros) + # AliRoot modules add_subdirectory(ACORDE) add_subdirectory(AD) add_subdirectory(BCM) -add_subdirectory(CORRFW) add_subdirectory(EMCAL) add_subdirectory(EPOS) add_subdirectory(EVE) @@ -208,11 +213,9 @@ add_subdirectory(FMD) add_subdirectory(HLT) add_subdirectory(HMPID) add_subdirectory(ITS) -add_subdirectory(JETAN) add_subdirectory(MFT) add_subdirectory(MONITOR) add_subdirectory(MUON) -add_subdirectory(OADB) add_subdirectory(PHOS) add_subdirectory(PMD) add_subdirectory(PYTHIA8) @@ -230,6 +233,7 @@ add_subdirectory(TRIGGER) add_subdirectory(TTherminator) add_subdirectory(VZERO) add_subdirectory(ZDC) +add_subdirectory(doxygen) # Fortran modules if(CMAKE_Fortran_COMPILER) @@ -249,20 +253,10 @@ if(CMAKE_Fortran_COMPILER) add_subdirectory(TAmpt) endif(CMAKE_Fortran_COMPILER) -# PWG libraries -add_subdirectory(PWG) -add_subdirectory(PWGCF) -# Depends on PWGCF - To fix dependencies -add_subdirectory(PWGGA) -# Depends on CF - To fix the dependencies -add_subdirectory(PWGDQ) -add_subdirectory(PWGHF) -# Depends on CF -add_subdirectory(PWGJE) -add_subdirectory(PWGLF) -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 @@ -278,4 +272,4 @@ if(SHUTTLE) endif() endif(SHUTTLE) -add_subdirectory(ALIROOT) \ No newline at end of file +add_subdirectory(ALIROOT)