PWHLFresonances converted to native cmake
authorhristov <Peter.Hristov@cern.ch>
Thu, 4 Dec 2014 15:11:05 +0000 (16:11 +0100)
committeragrigora <alina.grigoras@cern.ch>
Mon, 15 Dec 2014 12:52:06 +0000 (13:52 +0100)
PWGLF/CMakeLists.txt
PWGLF/CMakelibPWGLFresonances.pkg [deleted file]
PWGLF/RESONANCES/CMakeLists.txt [new file with mode: 0644]
PWGLF/RESONANCES/PWGLFresonancesLinkDef.h [moved from PWGLF/PWGLFresonancesLinkDef.h with 100% similarity]

index 3d0e2f0..61eb25e 100644 (file)
@@ -14,6 +14,7 @@
 # **************************************************************************
 
 # Include the libraries
+add_subdirectory (RESONANCES)
 add_subdirectory (SPECTRA)
 add_subdirectory (spectraJET)
 add_subdirectory (STRANGENESS)
diff --git a/PWGLF/CMakelibPWGLFresonances.pkg b/PWGLF/CMakelibPWGLFresonances.pkg
deleted file mode 100644 (file)
index 1452624..0000000
+++ /dev/null
@@ -1,103 +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 RESONANCES/AliRsnDaughter.cxx
-           RESONANCES/AliRsnMother.cxx
-           RESONANCES/AliRsnEvent.cxx
-           RESONANCES/AliRsnDaughterDef.cxx
-           RESONANCES/AliRsnPairDef.cxx
-           RESONANCES/AliRsnTarget.cxx
-           RESONANCES/AliRsnValue.cxx
-           RESONANCES/AliRsnAction.cxx
-           RESONANCES/AliRsnCut.cxx
-           RESONANCES/AliRsnValueDaughter.cxx
-           RESONANCES/AliRsnValuePair.cxx
-           RESONANCES/AliRsnValueEvent.cxx
-           RESONANCES/AliRsnCutEventUtils.cxx
-           RESONANCES/AliRsnCutPrimaryVertex.cxx
-           RESONANCES/AliRsnCutTrackQuality.cxx
-           RESONANCES/AliRsnCutTrue.cxx
-           RESONANCES/AliRsnCutValue.cxx
-           RESONANCES/AliRsnCutPID.cxx
-           RESONANCES/AliRsnCutPIDITS.cxx
-           RESONANCES/AliRsnCutPIDTPC.cxx
-           RESONANCES/AliRsnCutPIDTOF.cxx
-           RESONANCES/AliRsnPIDRange.cxx
-           RESONANCES/AliRsnCutPIDNSigma.cxx
-           RESONANCES/AliRsnCutMomentumComparison.cxx
-          RESONANCES/AliRsnCutTOFMatch.cxx
-          RESONANCES/AliRsnCutPhi.cxx
-           RESONANCES/AliRsnCutDelta.cxx
-          RESONANCES/AliRsnCutKaonForPhi2010.cxx
-           RESONANCES/AliRsnCutKaonForPhi2010PP.cxx
-           RESONANCES/AliRsnCutPion2010PP.cxx
-           RESONANCES/AliRsnCutProton2010PP.cxx
-           RESONANCES/AliRsnCutDaughterKStar2010PP.cxx 
-           RESONANCES/AliRsnCutDaughterLStar2010.cxx
-          RESONANCES/AliRsnCutDaughterSigmaStar2010PP.cxx 
-          RESONANCES/AliRsnCutSetDaughterParticle.cxx 
-          RESONANCES/AliRsnCutPhiRAA.cxx
-          RESONANCES/AliRsnCutDaughterD0.cxx
-           RESONANCES/AliRsnCutV0.cxx 
-           RESONANCES/AliRsnCutSet.cxx
-           RESONANCES/AliRsnExpression.cxx
-           RESONANCES/AliRsnVariableExpression.cxx
-           RESONANCES/AliRsnCutManager.cxx
-           RESONANCES/AliRsnListOutput.cxx
-           RESONANCES/AliRsnLoop.cxx
-           RESONANCES/AliRsnLoopDaughter.cxx
-           RESONANCES/AliRsnLoopPair.cxx
-           RESONANCES/AliRsnLoopEvent.cxx
-           RESONANCES/AliRsnLoopEff.cxx
-           RESONANCES/AliRsnLoopEffPair.cxx
-           RESONANCES/AliRsnDaughterSelector.cxx
-           RESONANCES/AliRsnInputHandler.cxx
-           RESONANCES/AliRsnAnalysisTask.cxx
-           RESONANCES/AliRsnMiniParticle.cxx
-           RESONANCES/AliRsnMiniPair.cxx
-           RESONANCES/AliRsnCutMiniPair.cxx
-           RESONANCES/AliRsnMiniEvent.cxx
-           RESONANCES/AliRsnMiniAxis.cxx
-           RESONANCES/AliRsnMiniOutput.cxx
-           RESONANCES/AliRsnMiniValue.cxx
-           RESONANCES/AliRsnMiniMonitor.cxx
-           RESONANCES/AliRsnMiniAnalysisTask.cxx
-           RESONANCES/AliRsnMiniMonitorTask.cxx
-           RESONANCES/AliRsnTrainManager.cxx
- )
-
-string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" )
-
-set ( DHDR PWGLFresonancesLinkDef.h)
-
-set ( EXPORT )
-
-set ( EINCLUDE  PYTHIA6 PWGLF/RESONANCES CORRFW ANALYSIS/EventMixing STEER/AOD STEER/ESD STEER/STEERBase ${EXTRA_INCLUDE} ANALYSIS)
-
-set ( PARINCLUDE PWGLF/RESONANCES )
-set ( EXPORT ${HDRS})
diff --git a/PWGLF/RESONANCES/CMakeLists.txt b/PWGLF/RESONANCES/CMakeLists.txt
new file mode 100644 (file)
index 0000000..a1d338c
--- /dev/null
@@ -0,0 +1,131 @@
+# **************************************************************************
+# * 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 PWGLFresonances)
+
+# Module include folder
+include_directories(${AliRoot_SOURCE_DIR}/PWGLF/RESONANCES)
+
+# 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}/STEER/AOD
+                    ${AliRoot_SOURCE_DIR}/STEER/ESD
+                    ${AliRoot_SOURCE_DIR}/STEER/STEERBase
+  )
+
+# Sources - alphabetical order
+set(SRCS
+  AliRsnDaughter.cxx
+  AliRsnMother.cxx
+  AliRsnEvent.cxx
+  AliRsnDaughterDef.cxx
+  AliRsnPairDef.cxx
+  AliRsnTarget.cxx
+  AliRsnValue.cxx
+  AliRsnAction.cxx
+  AliRsnCut.cxx
+  AliRsnValueDaughter.cxx
+  AliRsnValuePair.cxx
+  AliRsnValueEvent.cxx
+  AliRsnCutEventUtils.cxx
+  AliRsnCutPrimaryVertex.cxx
+  AliRsnCutTrackQuality.cxx
+  AliRsnCutTrue.cxx
+  AliRsnCutValue.cxx
+  AliRsnCutPID.cxx
+  AliRsnCutPIDITS.cxx
+  AliRsnCutPIDTPC.cxx
+  AliRsnCutPIDTOF.cxx
+  AliRsnPIDRange.cxx
+  AliRsnCutPIDNSigma.cxx
+  AliRsnCutMomentumComparison.cxx
+  AliRsnCutTOFMatch.cxx
+  AliRsnCutPhi.cxx
+  AliRsnCutDelta.cxx
+  AliRsnCutKaonForPhi2010.cxx
+  AliRsnCutKaonForPhi2010PP.cxx
+  AliRsnCutPion2010PP.cxx
+  AliRsnCutProton2010PP.cxx
+  AliRsnCutDaughterKStar2010PP.cxx 
+  AliRsnCutDaughterLStar2010.cxx
+  AliRsnCutDaughterSigmaStar2010PP.cxx 
+  AliRsnCutSetDaughterParticle.cxx 
+  AliRsnCutPhiRAA.cxx
+  AliRsnCutDaughterD0.cxx
+  AliRsnCutV0.cxx 
+  AliRsnCutSet.cxx
+  AliRsnExpression.cxx
+  AliRsnVariableExpression.cxx
+  AliRsnCutManager.cxx
+  AliRsnListOutput.cxx
+  AliRsnLoop.cxx
+  AliRsnLoopDaughter.cxx
+  AliRsnLoopPair.cxx
+  AliRsnLoopEvent.cxx
+  AliRsnLoopEff.cxx
+  AliRsnLoopEffPair.cxx
+  AliRsnDaughterSelector.cxx
+  AliRsnInputHandler.cxx
+  AliRsnAnalysisTask.cxx
+  AliRsnMiniParticle.cxx
+  AliRsnMiniPair.cxx
+  AliRsnCutMiniPair.cxx
+  AliRsnMiniEvent.cxx
+  AliRsnMiniAxis.cxx
+  AliRsnMiniOutput.cxx
+  AliRsnMiniValue.cxx
+  AliRsnMiniMonitor.cxx
+  AliRsnMiniAnalysisTask.cxx
+  AliRsnMiniMonitorTask.cxx
+  AliRsnTrainManager.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 CORRFW 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)