RWGCF converted to native cmake
authorhristov <Peter.Hristov@cern.ch>
Sat, 6 Dec 2014 14:03:38 +0000 (15:03 +0100)
committeragrigora <alina.grigoras@cern.ch>
Mon, 15 Dec 2014 12:52:08 +0000 (13:52 +0100)
CMakeLists.txt
PWGCF/CMakeLists.txt
PWGCF/CMakelibPWGCFebye.pkg [deleted file]
PWGCF/EBYE/CMakeLists.txt [new file with mode: 0644]
PWGCF/EBYE/PWGCFebyeLinkDef.h [moved from PWGCF/PWGCFebyeLinkDef.h with 100% similarity]

index dc43a4d..becaff0 100644 (file)
@@ -247,6 +247,7 @@ 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
index 0fedb8e..729d57d 100644 (file)
@@ -1,10 +1,19 @@
-# AliRoot Build System CMakeLists for PWGCF
-#
-# Author: Johny Jose m(johny.jose@cern.ch)
-#         Port of previous Makefile build to cmake
+# **************************************************************************
+# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
+# *                                                                        *
+# * Author: The ALICE Off-line Project.                                    *
+# * Contributors are mentioned in the code where appropriate.              *
+# *                                                                        *
+# * Permission to use, copy, modify and distribute this software and its   *
+# * documentation strictly for non-commercial purposes is hereby granted   *
+# * without fee, provided that the above copyright notice appears in all   *
+# * copies and that both the copyright notice and this permission notice   *
+# * appear in the supporting documentation. The authors make no claims     *
+# * about the suitability of this software for any purpose. It is          *
+# * provided "as is" without express or implied warranty.                  *
+# **************************************************************************
 
-cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
+# Include the libraries
+add_subdirectory(EBYE)
 
-file(GLOB PACKAGES CMake*.pkg)
-
-ALICE_BuildModule()
+message(STATUS "PWGCF enabled")
diff --git a/PWGCF/CMakelibPWGCFebye.pkg b/PWGCF/CMakelibPWGCFebye.pkg
deleted file mode 100644 (file)
index 537e67e..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- mode: CMake -*-
-#--------------------------------------------------------------------------------#
-# Package File for PWG2ebye                                                      #
-# Author : Johny Jose (johny.jose@cern.ch)                                       #
-# Variables Defined :                                                            #
-#                                                                                #
-# SRCS - C++ source files                                                        #
-# HDRS - C++ header files                                                        #
-# DHDR - ROOT Dictionary Linkdef header file                                     #
-# CSRCS - C source files                                                         #
-# CHDRS - C header files                                                         #
-# EINCLUDE - Include directories                                                 #
-# EDEFINE - Compiler definitions                                                 #
-# ELIBS - Extra libraries to link                                                #
-# ELIBSDIR - Extra library directories                                           #
-# PACKFFLAGS - Fortran compiler flags for package                                #
-# PACKCXXFLAGS - C++ compiler flags for package                                  #
-# PACKCFLAGS - C compiler flags for package                                      #
-# PACKSOFLAGS - Shared library linking flags                                     #
-# PACKLDFLAGS - Module linker flags                                              #
-# PACKBLIBS - Libraries to link (Executables only)                               #
-# EXPORT - Header files to be exported                                           #
-# CINTHDRS - Dictionary header files                                             #
-# CINTAUTOLINK - Set automatic dictionary generation                             #
-# ARLIBS - Archive Libraries and objects for linking (Executables only)          #
-# SHLIBS - Shared Libraries and objects for linking (Executables only)           #
-#--------------------------------------------------------------------------------#
-
-set ( SRCS   
-    EBYE/BalanceFunctions/AliAnalysisTaskToyModel.cxx 
-    EBYE/BalanceFunctions/AliAnalysisTaskBF.cxx 
-    EBYE/BalanceFunctions/AliAnalysisTaskBFPsi.cxx 
-    EBYE/BalanceFunctions/AliAnalysisTaskEventMixingBF.cxx 
-    EBYE/BalanceFunctions/AliAnalysisTaskTriggeredBF.cxx 
-    EBYE/BalanceFunctions/AliAnalysisTaskEfficiencyBF.cxx 
-    EBYE/BalanceFunctions/AliAnalysisTaskEfficiencyBFPsi.cxx 
-    EBYE/BalanceFunctions/AliAnalysisTaskEffContBF.cxx
-    EBYE/BalanceFunctions/AliBalance.cxx 
-    EBYE/BalanceFunctions/AliBalancePsi.cxx 
-    EBYE/BalanceFunctions/AliBalanceEventMixing.cxx 
-    EBYE/BalanceFunctions/AliBalanceTriggered.cxx 
-    EBYE/BalanceFunctions/AliAnalysisTaskAODFilterBitQA.cxx 
-    EBYE/LRC/AliLRCBase.cxx
-    EBYE/LRC/AliAnalysisTaskLRC.cxx 
-    EBYE/LRC/AliLRCAnalysis.cxx 
-    EBYE/LRC/AliLRCFit.cxx 
-    EBYE/LRC/AliLRCNN.cxx 
-    EBYE/LRC/AliLRCPtN.cxx 
-    EBYE/LRC/AliLRCPtPt.cxx 
-    EBYE/LRC/AliLRCProcess.cxx 
-    EBYE/Fluctuations/AliEbyEFluctuationAnalysisTask.cxx 
-    EBYE/Fluctuations/AliAnalysisTaskChargeFluctuations.cxx
-    EBYE/Fluctuations/AliEbyEHigherMomentsTask.cxx 
-    EBYE/Fluctuations/AliEbyEHigherMomentsEffContTask.cxx    
-    EBYE/Fluctuations/AliHigherMomentsToyModel.cxx    
-    EBYE/Fluctuations/AliEbyEMultFluctuationTask.cxx
-    EBYE/Fluctuations/AliEbyEHigherMomentsTaskPID.cxx
-    EBYE/MeanPtFluctuations/AliAnalysisTaskPtFluc.cxx 
-    EBYE/MeanPtFluctuations/AliAnalysisTaskPtFlucPbPb.cxx
-    EBYE/PIDFluctuation/task/AliAnalysisTaskPIDFluctuation.cxx  
-    EBYE/PIDFluctuation/task/AliEbyENetChargeFluctuationTask.cxx        
-    EBYE/PIDFluctuation/task/AliEbyEParticleRatioFluctuationTask.cxx
-    EBYE/PIDFluctuation/task/AliEbyEPidTaskFastGen.cxx  
-    EBYE/PIDFluctuation/task/AliEbyEPidTTask.cxx 
-    EBYE/PIDFluctuation/task/AliEbyEPidTTaskMC.cxx 
-    EBYE/PIDFluctuation/task/AliEbyEPidRatioBase.cxx
-    EBYE/PIDFluctuation/task/AliEbyEPidRatioDCA.cxx
-    EBYE/PIDFluctuation/task/AliEbyEPidRatioPhy.cxx
-    EBYE/PIDFluctuation/task/AliEbyEPidRatioEffCont.cxx
-    EBYE/PIDFluctuation/task/AliEbyEPidRatioEffContExtra.cxx
-    EBYE/PIDFluctuation/task/AliEbyEPidRatioHelper.cxx
-    EBYE/PIDFluctuation/task/AliEbyEPidRatioQA.cxx     
-    EBYE/PIDFluctuation/task/AliEbyEPidRatioTaskOnFly.cxx
-    EBYE/PIDFluctuation/task/AliEbyEPidQATaskOnFlyKine.cxx
-    EBYE/PIDFluctuation/task/AliEbyEPidRatioTask.cxx
-    EBYE/NetParticle/AliAnalysisNetParticleBase.cxx
-    EBYE/NetParticle/AliAnalysisNetParticleDCA.cxx
-    EBYE/NetParticle/AliAnalysisNetParticleDistribution.cxx
-    EBYE/NetParticle/AliAnalysisNetParticleEffCont.cxx
-    EBYE/NetParticle/AliAnalysisNetParticleHelper.cxx
-    EBYE/NetParticle/AliAnalysisTaskNetParticle.cxx
-    EBYE/NetParticle/AliAnalysisNetParticleQA.cxx
-    )
-
-string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" )
-
-set ( DHDR PWGCFebyeLinkDef.h)
-
-set ( EXPORT )
-
-set ( EINCLUDE PWG/Tools ANALYSIS/EventMixing PWGCF/EBYE PWGCF/EBYE/BalanceFunctions PWGCF/EBYE/LRC PWGCF/EBYE/Fluctuations PWGCF/EBYE/NetParticle PWGCF/EBYE/PIDFluctuation/task STEER/STEER STEER/STEERBase ANALYSIS CORRFW)
diff --git a/PWGCF/EBYE/CMakeLists.txt b/PWGCF/EBYE/CMakeLists.txt
new file mode 100644 (file)
index 0000000..31ba21e
--- /dev/null
@@ -0,0 +1,123 @@
+# **************************************************************************
+# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
+# *                                                                        *
+# * Author: The ALICE Off-line Project.                                    *
+# * Contributors are mentioned in the code where appropriate.              *
+# *                                                                        *
+# * Permission to use, copy, modify and distribute this software and its   *
+# * documentation strictly for non-commercial purposes is hereby granted   *
+# * without fee, provided that the above copyright notice appears in all   *
+# * copies and that both the copyright notice and this permission notice   *
+# * appear in the supporting documentation. The authors make no claims     *
+# * about the suitability of this software for any purpose. It is          *
+# * provided "as is" without express or implied warranty.                  *
+# **************************************************************************/
+
+#Module
+set (MODULE PWGCFebye)
+
+# Module include folder
+include_directories(${AliRoot_SOURCE_DIR}/PWGCF/EBYE)
+
+# Additional includes - alphabetical order except ROOT
+include_directories(${ROOT_INCLUDE_DIRS}
+                    ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSIS
+                    ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSISalice
+                    ${AliRoot_SOURCE_DIR}/ANALYSIS/EventMixing
+                    ${AliRoot_SOURCE_DIR}/CORRFW
+                    ${AliRoot_SOURCE_DIR}/PWG/Tools
+                    ${AliRoot_SOURCE_DIR}/PWGCF/EBYE/LRC
+                    ${AliRoot_SOURCE_DIR}/STEER/ESD
+                    ${AliRoot_SOURCE_DIR}/STEER/STEER
+                    ${AliRoot_SOURCE_DIR}/STEER/STEERBase
+  )
+
+# Sources - alphabetical order
+set(SRCS
+  BalanceFunctions/AliAnalysisTaskToyModel.cxx
+  BalanceFunctions/AliAnalysisTaskBF.cxx
+  BalanceFunctions/AliAnalysisTaskBFPsi.cxx
+  BalanceFunctions/AliAnalysisTaskEventMixingBF.cxx
+  BalanceFunctions/AliAnalysisTaskTriggeredBF.cxx
+  BalanceFunctions/AliAnalysisTaskEfficiencyBF.cxx
+  BalanceFunctions/AliAnalysisTaskEfficiencyBFPsi.cxx
+  BalanceFunctions/AliAnalysisTaskEffContBF.cxx
+  BalanceFunctions/AliBalance.cxx
+  BalanceFunctions/AliBalancePsi.cxx
+  BalanceFunctions/AliBalanceEventMixing.cxx
+  BalanceFunctions/AliBalanceTriggered.cxx
+  BalanceFunctions/AliAnalysisTaskAODFilterBitQA.cxx
+  LRC/AliLRCBase.cxx
+  LRC/AliAnalysisTaskLRC.cxx
+  LRC/AliLRCAnalysis.cxx
+  LRC/AliLRCFit.cxx
+  LRC/AliLRCNN.cxx
+  LRC/AliLRCPtN.cxx
+  LRC/AliLRCPtPt.cxx
+  LRC/AliLRCProcess.cxx
+  Fluctuations/AliEbyEFluctuationAnalysisTask.cxx
+  Fluctuations/AliAnalysisTaskChargeFluctuations.cxx
+  Fluctuations/AliEbyEHigherMomentsTask.cxx
+  Fluctuations/AliEbyEHigherMomentsEffContTask.cxx
+  Fluctuations/AliHigherMomentsToyModel.cxx
+  Fluctuations/AliEbyEMultFluctuationTask.cxx
+  Fluctuations/AliEbyEHigherMomentsTaskPID.cxx
+  MeanPtFluctuations/AliAnalysisTaskPtFluc.cxx
+  MeanPtFluctuations/AliAnalysisTaskPtFlucPbPb.cxx
+  PIDFluctuation/task/AliAnalysisTaskPIDFluctuation.cxx
+  PIDFluctuation/task/AliEbyENetChargeFluctuationTask.cxx
+  PIDFluctuation/task/AliEbyEParticleRatioFluctuationTask.cxx
+  PIDFluctuation/task/AliEbyEPidTaskFastGen.cxx
+  PIDFluctuation/task/AliEbyEPidTTask.cxx
+  PIDFluctuation/task/AliEbyEPidTTaskMC.cxx
+  PIDFluctuation/task/AliEbyEPidRatioBase.cxx
+  PIDFluctuation/task/AliEbyEPidRatioDCA.cxx
+  PIDFluctuation/task/AliEbyEPidRatioPhy.cxx
+  PIDFluctuation/task/AliEbyEPidRatioEffCont.cxx
+  PIDFluctuation/task/AliEbyEPidRatioEffContExtra.cxx
+  PIDFluctuation/task/AliEbyEPidRatioHelper.cxx
+  PIDFluctuation/task/AliEbyEPidRatioQA.cxx
+  PIDFluctuation/task/AliEbyEPidRatioTaskOnFly.cxx
+  PIDFluctuation/task/AliEbyEPidQATaskOnFlyKine.cxx
+  PIDFluctuation/task/AliEbyEPidRatioTask.cxx
+  NetParticle/AliAnalysisNetParticleBase.cxx
+  NetParticle/AliAnalysisNetParticleDCA.cxx
+  NetParticle/AliAnalysisNetParticleDistribution.cxx
+  NetParticle/AliAnalysisNetParticleEffCont.cxx
+  NetParticle/AliAnalysisNetParticleHelper.cxx
+  NetParticle/AliAnalysisTaskNetParticle.cxx
+  NetParticle/AliAnalysisNetParticleQA.cxx
+  )
+
+# Headers from sources
+string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
+
+# Generate the dictionary
+# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
+get_directory_property(incdirs INCLUDE_DIRECTORIES)
+generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
+
+# Add a shared library
+add_library(${MODULE} SHARED  ${SRCS} G__${MODULE}.cxx)
+
+# Generate the ROOT map
+# Dependecies
+set(LIBDEPS ANALYSISalice PWGTools EventMixing)
+generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
+
+# Linking the library
+target_link_libraries(${MODULE} ${LIBDEPS})
+
+# Public include folders that will be propagated to the dependecies
+target_include_directories(${MODULE} PUBLIC ${incdirs})
+
+# System dependent: Modify the way the library is build
+if(${CMAKE_SYSTEM} MATCHES Darwin)
+    set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+endif(${CMAKE_SYSTEM} MATCHES Darwin)
+
+# Installation
+install(TARGETS ${MODULE} 
+  ARCHIVE DESTINATION lib
+  LIBRARY DESTINATION lib)
+install(FILES ${HDRS} DESTINATION include)