PWGLFspectra converted to native cmake, all PWG libs reordered and enabled
authorhristov <Peter.Hristov@cern.ch>
Thu, 4 Dec 2014 13:23:38 +0000 (14:23 +0100)
committeragrigora <alina.grigoras@cern.ch>
Mon, 15 Dec 2014 12:52:06 +0000 (13:52 +0100)
CMakeLists.txt
PWG/CMakeLists.txt
PWGLF/CMakeLists.txt
PWGLF/CMakelibPWGLFspectra.pkg [deleted file]
PWGLF/SPECTRA/CMakeLists.txt [new file with mode: 0644]
PWGLF/SPECTRA/PWGLFspectraLinkDef.h [moved from PWGLF/PWGLFspectraLinkDef.h with 100% similarity]

index 0081e6e..a807154 100644 (file)
@@ -248,6 +248,7 @@ endif(CMAKE_Fortran_COMPILER)
 # PWG libraries
 add_subdirectory(PWG)
 add_subdirectory(PWGDQ)
+add_subdirectory(PWGLF)
 add_subdirectory(PWGUD)
 
 # Enable SHUTTLE compilation
index ce8fef4..c52e585 100644 (file)
 # **************************************************************************
 
 # Include the libraries
-add_subdirectory (Tools)
-add_subdirectory (Glauber)
-add_subdirectory (muon)
+add_subdirectory (CaloTrackCorrBase)
+add_subdirectory (DevNanoAOD)
 add_subdirectory (EMCAL)
 add_subdirectory (FLOW)
-add_subdirectory (TRD)
+add_subdirectory (Glauber)
+add_subdirectory (muon)
 add_subdirectory (muondep)
-add_subdirectory (CaloTrackCorrBase)
-
-# Needs PWGLFspectra
-# add_subdirectory (DevNanoAOD)
+add_subdirectory (Tools)
+add_subdirectory (TRD)
 
 message(STATUS "PWG enabled")
index 3163e26..06dff75 100644 (file)
@@ -1,10 +1,19 @@
-# AliRoot Build System CMakeLists for PWGLF
-#
-# 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 (SPECTRA)
 
-file(GLOB PACKAGES CMake*.pkg)
-
-ALICE_BuildModule()
+message(STATUS "PWGLF enabled")
diff --git a/PWGLF/CMakelibPWGLFspectra.pkg b/PWGLF/CMakelibPWGLFspectra.pkg
deleted file mode 100644 (file)
index e8fdb3e..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- mode: CMake -*-
-#--------------------------------------------------------------------------------#
-# Package File for PWGLFresonances                                                #
-# 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 SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAcceptanceCuts.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysis.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPb.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPb2011.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPbAOD.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysispPb.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtBackgroundCuts.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCorrection.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCutAnalysis.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCutAnalysisPbPb.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPt.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtEfficiency.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtEventCuts.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtHelper.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtTask.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AlidNdPtTrackDumpTask.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AliPtResolAnalysis.cxx
-       SPECTRA/ChargedHadrons/dNdPt/AliPtResolAnalysisPbPb.cxx
-       SPECTRA/PiKaPr/ITSsa/AliAnalysisTaskSEITSsaSpectra.cxx
-       SPECTRA/PiKaPr/TPCTOF/AliAnalysisCombinedHadronSpectra.cxx
-       SPECTRA/PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx
-       SPECTRA/PiKaPr/TOF/pp7/TOFSpectrappAnalysis.cxx
-       SPECTRA/PiKaPr/TOF/pp7/AliAnalysisCombinedHadronSpectra2MC.cxx
-       SPECTRA/ParticleEfficiency/AliAnalysisTaskParticleEfficiency.cxx
-       SPECTRA/PiKaPr/TestAOD/AliSpectraAODTrackCuts.cxx
-       SPECTRA/PiKaPr/TestAOD/AliSpectraAODEventCuts.cxx
-       SPECTRA/PiKaPr/TestAOD/AliSpectraAODHistoManager.cxx
-       SPECTRA/PiKaPr/TestAOD/AliSpectraAODPID.cxx
-       SPECTRA/PiKaPr/TestAOD/AliAnalysisTaskSpectraAOD.cxx
-        SPECTRA/PiKaPr/TestAOD/AliAnalysisTaskSpectraAllChAOD.cxx
-        SPECTRA/PiKaPr/TestAOD/AliAnalysisTaskV2AllChAOD.cxx
-        SPECTRA/Kinks/AliAnalysisKinkESDat.cxx
-        SPECTRA/Kinks/AliAnalysisKinkESDMC.cxx
-       SPECTRA/PiKaPr/TestAOD/AliSpectraBothTrackCuts.cxx
-        SPECTRA/PiKaPr/TestAOD/AliSpectraBothEventCuts.cxx
-        SPECTRA/PiKaPr/TestAOD/AliSpectraBothHistoManager.cxx
-        SPECTRA/PiKaPr/TestAOD/AliSpectraBothPID.cxx
-        SPECTRA/PiKaPr/TestAOD/AliAnalysisTaskSpectraBoth.cxx
-       SPECTRA/Nuclei/B2/AliLnID.cxx
-       SPECTRA/Nuclei/B2/AliLnHistoMap.cxx
-       SPECTRA/Nuclei/B2/AliLnAODtrackCuts.cxx
-       SPECTRA/Nuclei/B2/AliAnalysisTaskB2.cxx
-       SPECTRA/Nuclei/B2/AliAnalysisTaskB2AOD.cxx
-        SPECTRA/Nuclei/masses/AliAnalysisNucleiMass.cxx
-       SPECTRA/Nuclei/masses/AliAnalysisNucleiInfo.cxx
-       SPECTRA/Nuclei/deuteronpA/AliAnalysisDeuteronpA.cxx
-       SPECTRA/XtAnalysis/AliXtAnalysis.cxx
-       SPECTRA/XtAnalysis/AliJXtHistos.cxx
-       SPECTRA/XtAnalysis/AliJBaseTrack.cxx
-       SPECTRA/XtAnalysis/AliJBaseCard.cxx
-        SPECTRA/XtAnalysis/AliJCard.cxx
-        SPECTRA/IdentifiedHighPt/train/AliAnalysisTaskHighPtDeDx.cxx
-        SPECTRA/IdentifiedHighPt/train/DebugClassesMultESA2013.cxx
-
- )
-
-string ( REPLACE ".cxx" ".h" HDRS "${SRCS} SPECTRA/XtAnalysis/AliJConst.h" )
-
-set ( DHDR PWGLFspectraLinkDef.h)
-
-set ( EXPORT )
-
-set ( EINCLUDE PWGLF/SPECTRA/IdentifiedHighPt/train PWGLF/SPECTRA/Nuclei/B2 PWGLF/SPECTRA/PiKaPr/TPCTOF PWGLF/SPECTRA/PiKaPr/TPCTOFpA PWGLF/SPECTRA/PiKaPr/TOF/pp7 PWGLF/SPECTRA/ChargedHadrons/dNdPt PWGLF/SPECTRA/XtAnalysis TPC TOF PWGUD/base STEER/STEER STEER/ESD STEER/AOD STEER/CDB STEER/STEERBase ANALYSIS PWG/Tools)
diff --git a/PWGLF/SPECTRA/CMakeLists.txt b/PWGLF/SPECTRA/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8185622
--- /dev/null
@@ -0,0 +1,128 @@
+# **************************************************************************
+# * 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 PWGLFspectra)
+
+# Module include folder
+include_directories(${AliRoot_SOURCE_DIR}/PWGLF/SPECTRA)
+
+# 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/ESDfilter
+                    ${AliRoot_SOURCE_DIR}/CORRFW
+                    ${AliRoot_SOURCE_DIR}/PWG/Tools
+                    ${AliRoot_SOURCE_DIR}/PWGLF/SPECTRA/XtAnalysis
+                    ${AliRoot_SOURCE_DIR}/PWGUD/base
+                    ${AliRoot_SOURCE_DIR}/STEER/AOD
+                    ${AliRoot_SOURCE_DIR}/STEER/CDB
+                    ${AliRoot_SOURCE_DIR}/STEER/ESD
+                    ${AliRoot_SOURCE_DIR}/STEER/STEER
+                    ${AliRoot_SOURCE_DIR}/STEER/STEERBase
+                    ${AliRoot_SOURCE_DIR}/TOF/TOFbase
+                    ${AliRoot_SOURCE_DIR}/TOF/TOFrec
+  )
+
+# Sources - alphabetical order
+set(SRCS
+  ChargedHadrons/dNdPt/AlidNdPtAcceptanceCuts.cxx
+  ChargedHadrons/dNdPt/AlidNdPtAnalysis.cxx
+  ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPb.cxx
+  ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPb2011.cxx
+  ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPbAOD.cxx
+  ChargedHadrons/dNdPt/AlidNdPtAnalysispPb.cxx
+  ChargedHadrons/dNdPt/AlidNdPtBackgroundCuts.cxx
+  ChargedHadrons/dNdPt/AlidNdPtCorrection.cxx
+  ChargedHadrons/dNdPt/AlidNdPtCutAnalysis.cxx
+  ChargedHadrons/dNdPt/AlidNdPtCutAnalysisPbPb.cxx
+  ChargedHadrons/dNdPt/AlidNdPt.cxx
+  ChargedHadrons/dNdPt/AlidNdPtEfficiency.cxx
+  ChargedHadrons/dNdPt/AlidNdPtEventCuts.cxx
+  ChargedHadrons/dNdPt/AlidNdPtHelper.cxx
+  ChargedHadrons/dNdPt/AlidNdPtTask.cxx
+  ChargedHadrons/dNdPt/AlidNdPtTrackDumpTask.cxx
+  ChargedHadrons/dNdPt/AliPtResolAnalysis.cxx
+  ChargedHadrons/dNdPt/AliPtResolAnalysisPbPb.cxx
+  PiKaPr/ITSsa/AliAnalysisTaskSEITSsaSpectra.cxx
+  PiKaPr/TPCTOF/AliAnalysisCombinedHadronSpectra.cxx
+  PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx
+  PiKaPr/TOF/pp7/TOFSpectrappAnalysis.cxx
+  PiKaPr/TOF/pp7/AliAnalysisCombinedHadronSpectra2MC.cxx
+  ParticleEfficiency/AliAnalysisTaskParticleEfficiency.cxx
+  PiKaPr/TestAOD/AliSpectraAODTrackCuts.cxx
+  PiKaPr/TestAOD/AliSpectraAODEventCuts.cxx
+  PiKaPr/TestAOD/AliSpectraAODHistoManager.cxx
+  PiKaPr/TestAOD/AliSpectraAODPID.cxx
+  PiKaPr/TestAOD/AliAnalysisTaskSpectraAOD.cxx
+  PiKaPr/TestAOD/AliAnalysisTaskSpectraAllChAOD.cxx
+  PiKaPr/TestAOD/AliAnalysisTaskV2AllChAOD.cxx
+  Kinks/AliAnalysisKinkESDat.cxx
+  Kinks/AliAnalysisKinkESDMC.cxx
+  PiKaPr/TestAOD/AliSpectraBothTrackCuts.cxx
+  PiKaPr/TestAOD/AliSpectraBothEventCuts.cxx
+  PiKaPr/TestAOD/AliSpectraBothHistoManager.cxx
+  PiKaPr/TestAOD/AliSpectraBothPID.cxx
+  PiKaPr/TestAOD/AliAnalysisTaskSpectraBoth.cxx
+  Nuclei/B2/AliLnID.cxx
+  Nuclei/B2/AliLnHistoMap.cxx
+  Nuclei/B2/AliLnAODtrackCuts.cxx
+  Nuclei/B2/AliAnalysisTaskB2.cxx
+  Nuclei/B2/AliAnalysisTaskB2AOD.cxx
+  Nuclei/masses/AliAnalysisNucleiMass.cxx
+  Nuclei/masses/AliAnalysisNucleiInfo.cxx
+  Nuclei/deuteronpA/AliAnalysisDeuteronpA.cxx
+  XtAnalysis/AliXtAnalysis.cxx
+  XtAnalysis/AliJXtHistos.cxx
+  XtAnalysis/AliJBaseTrack.cxx
+  XtAnalysis/AliJBaseCard.cxx
+  XtAnalysis/AliJCard.cxx
+  IdentifiedHighPt/train/AliAnalysisTaskHighPtDeDx.cxx
+  IdentifiedHighPt/train/DebugClassesMultESA2013.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 PWGUDbase)
+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)