DA rpms
authoragrigora <alina.grigoras@cern.ch>
Tue, 2 Dec 2014 16:23:50 +0000 (17:23 +0100)
committeragrigora <alina.grigoras@cern.ch>
Mon, 15 Dec 2014 12:52:04 +0000 (13:52 +0100)
16 files changed:
ACORDE/DA/CMakeLists.txt
EMCAL/DA/CMakeLists.txt
FMD/DA/CMakeLists.txt
HMPID/DA/CMakeLists.txt
ITS/DA/CMakeLists.txt
MUON/DA/CMakeLists.txt
PHOS/DA/CMakeLists.txt
PMD/DA/CMakeLists.txt
T0/DA/CMakeLists.txt
TOF/DA/CMakeLists.txt
TPC/DA/CMakeLists.txt
TRD/DA/CMakeLists.txt
VZERO/DA/CMakeLists.txt
ZDC/DA/CMakeLists.txt
cmake/CMakeALICE.cmake
cmake/da.spec.in

index e7f725e..8fa95e9 100644 (file)
@@ -25,37 +25,5 @@ include_directories(
                     ${AliRoot_SOURCE_DIR}/STEER/ESD
                    )
 
-
-# Sources in alphabetical order
-set(SRCS
-    ACORDEda.cxx
-   )
-   
-# DIM
-link_directories(${DIMDIR}/${ODIR})
-
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
-
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-
-# Generating the DA executable
-add_executable(ACORDEda ${SRCS})
-
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-target_link_libraries(ACORDEda ESD-static RAWDatabase-static RAWDatarec-static ACORDEbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-# DATE flags
-set_target_properties(ACORDEda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(ACORDEda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# Installation
-install(TARGETS ACORDEda RUNTIME DESTINATION bin)
+set(STATIC_DEPENDENCIES  ESD-static RAWDatabase-static RAWDatarec-static ACORDEbase-static)
+generateDA("ACORDE" "" "${STATIC_DEPENDENCIES}")
\ No newline at end of file
index a44baff..ab7f443 100644 (file)
@@ -26,36 +26,7 @@ include_directories(
                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
                    )
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
-
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-
-# Generating the DA executable
-add_executable(EMCALPEDda EMCALPEDda.cxx)
-add_executable(EMCALLEDda EMCALLEDda.cxx)
-
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-target_link_libraries(EMCALPEDda EMCALbase-static RAWDatarec-static RAWDatabase-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-target_link_libraries(EMCALLEDda EMCALbase-static RAWDatarec-static RAWDatabase-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-# DATE flags
-set_target_properties(EMCALPEDda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(EMCALPEDda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(EMCALLEDda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(EMCALLEDda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# Installation
-install(TARGETS EMCALPEDda EMCALLEDda RUNTIME DESTINATION bin)
+set(STATIC_DEPENDENCIES EMCALbase-static RAWDatarec-static RAWDatabase-static STEERBase-static)
+generateDA("EMCAL" "PED" "${STATIC_DEPENDENCIES}")
+generateDA("EMCAL" "LED" "${STATIC_DEPENDENCIES}")
index 2654fe6..94ba65b 100644 (file)
@@ -27,42 +27,11 @@ include_directories(
                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
                    )
 
+set(STATIC_DEPENDENCIES FMDbase-static FMDutil-static RAWDatarec-static STEERBase-static)
+generateDA("FMD" "Base" "${STATIC_DEPENDENCIES}")
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
+set(STATIC_DEPENDENCIES FMDbase-static FMDutil-static)
+generateDA("FMD" "Gain" "${STATIC_DEPENDENCIES}")
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
-
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
-
-# Generating the DA executable
-add_executable(FMDBaseda FMDBaseda.cxx)
-add_executable(FMDGainda FMDGainda.cxx)
-add_executable(FMDPedestalda FMDGainda.cxx)
-
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-target_link_libraries(FMDBaseda FMDbase-static FMDutil-static RAWDatarec-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-target_link_libraries(FMDGainda FMDbase-static FMDutil-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-target_link_libraries(FMDPedestalda FMDbase-static FMDutil-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-set_target_properties(FMDBaseda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(FMDBaseda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(FMDGainda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(FMDGainda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(FMDPedestalda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(FMDPedestalda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# Installation
-install(TARGETS FMDBaseda FMDGainda FMDPedestalda RUNTIME DESTINATION bin)
\ No newline at end of file
+set(STATIC_DEPENDENCIES  FMDbase-static FMDutil-static)
+generateDA("FMD" "Pedestal" "${STATIC_DEPENDENCIES}")
index 392d48d..7486c34 100644 (file)
@@ -29,36 +29,8 @@ include_directories(
                    )
 
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
+set(STATIC_DEPENDENCIES HMPIDbase-static RAWDatarecOnline-static RAWDatarec-static RAWDatasim-static)
+generateDA("HMPID" "" "${STATIC_DEPENDENCIES}")
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
-
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
-
-# Generating the DA executable
-add_executable(HMPIDda HMPIDda.cxx)
-add_executable(HMPIDphysda HMPIDphysda.cxx)
-
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-target_link_libraries(HMPIDda HMPIDbase-static RAWDatarecOnline-static RAWDatarec-static RAWDatasim-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-target_link_libraries(HMPIDphysda HMPIDbase-static RAWDatarecOnline-static RAWDatarec-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-set_target_properties(HMPIDda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(HMPIDda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(HMPIDphysda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(HMPIDphysda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# Installation
-install(TARGETS HMPIDda HMPIDphysda RUNTIME DESTINATION bin)
\ No newline at end of file
+set(STATIC_DEPENDENCIES HMPIDbase-static RAWDatarecOnline-static RAWDatarec-static)
+generateDA("HMPID" "phys" "${STATIC_DEPENDENCIES}")
index b3ea0d6..b92c423 100644 (file)
@@ -28,83 +28,28 @@ include_directories(
                    )
 
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
+set(STATIC_DEPENDENCIES ITSbase ITSrec RAWDatarec)
+generateDA("ITS" "SDDBAS" "${STATIC_DEPENDENCIES}")
 
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
+set(STATIC_DEPENDENCIES ITSrec-static ITSbase-static RAWDatarec-static)
+generateDA("ITS" "SDDGAIN" "${STATIC_DEPENDENCIES}")
 
-# Generating the DA executable
-add_executable(ITSSDDBASda ITSSDDBASda.cxx) # 1
-add_executable(ITSSDDGAINda ITSSDDGAINda.cxx) # 2
-add_executable(ITSSDDINJda ITSSDDINJda.cxx) # 3
-add_executable(ITSSPDFOda ITSSPDFOda.cxx) # 4
-add_executable(ITSSPDPHYSda ITSSPDPHYSda.cxx) # 5
-add_executable(ITSSPDSCANda ITSSPDSCANda.cxx) # 6
-add_executable(ITSSPDVertexDiamondda ITSSPDVertexDiamondda.cxx) # 7
-add_executable(ITSSSDPEDda ITSSSDPEDda.cxx) # 8
+set(STATIC_DEPENDENCIES ITSrec-static ITSbase-static RAWDatarec-static)
+generateDA("ITS" "SDDINJ" "${STATIC_DEPENDENCIES}")
 
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
+set(STATIC_DEPENDENCIES ITSrec-static ITSbase-static RAWDatarec-static STEERBase-static)
+generateDA("ITS" "SPDFO" "${STATIC_DEPENDENCIES}")
 
-target_link_libraries(ITSSDDBASda ITSbase ITSrec RAWDatarec ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1
-target_link_libraries(ITSSDDGAINda ITSrec-static ITSbase-static RAWDatarec-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 2
-target_link_libraries(ITSSDDINJda ITSrec-static ITSbase-static RAWDatarec-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 3
-target_link_libraries(ITSSPDFOda ITSrec-static ITSbase-static RAWDatarec-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 4
-target_link_libraries(ITSSPDPHYSda ITSrec-static ITSbase-static RAWDatarec-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 5
-target_link_libraries(ITSSPDSCANda ITSrec-static ITSbase-static RAWDatarec-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 6
-target_link_libraries(ITSSPDVertexDiamondda ITSrec-static RAWDatarec-static STEERBase-static CDB-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 7
-target_link_libraries(ITSSSDPEDda ITSbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 8
+set(STATIC_DEPENDENCIES ITSrec-static ITSbase-static RAWDatarec-static STEERBase-static)
+generateDA("ITS" "SPDPHYS" "${STATIC_DEPENDENCIES}")
 
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
+set(STATIC_DEPENDENCIES ITSrec-static ITSbase-static RAWDatarec-static STEERBase-static)
+generateDA("ITS" "SPDSCAN" "${STATIC_DEPENDENCIES}")
 
-# 1
-set_target_properties(ITSSDDBASda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(ITSSDDBASda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
+set(STATIC_DEPENDENCIES ITSrec-static RAWDatarec-static STEERBase-static CDB-static)
+generateDA("ITS" "SPDVertexDiamond" "${STATIC_DEPENDENCIES}")
 
-# 2
-set_target_properties(ITSSDDGAINda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(ITSSDDGAINda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
+set(STATIC_DEPENDENCIES ITSbase-static)
+generateDA("ITS" "SSDPED" "${STATIC_DEPENDENCIES}")
 
-# 3
-set_target_properties(ITSSDDINJda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(ITSSDDINJda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# 4
-set_target_properties(ITSSPDFOda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(ITSSPDFOda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# 5
-set_target_properties(ITSSPDPHYSda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(ITSSPDPHYSda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# 6
-set_target_properties(ITSSPDSCANda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(ITSSPDSCANda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# 7
-set_target_properties(ITSSPDVertexDiamondda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(ITSSPDVertexDiamondda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# 8
-set_target_properties(ITSSSDPEDda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(ITSSSDPEDda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-
-# Installation
-install(TARGETS ITSSDDBASda
-                ITSSDDGAINda
-                ITSSDDINJda
-                ITSSPDFOda
-                ITSSPDPHYSda
-                ITSSPDSCANda
-                ITSSPDVertexDiamondda
-                ITSSSDPEDda
-                            RUNTIME DESTINATION bin)
index c099108..f0f6c94 100644 (file)
@@ -30,46 +30,14 @@ include_directories(
                    )
 
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
+set(STATIC_DEPENDENCIES MUONcalib-static MUONcore-static MUONmapping-static MUONraw-static RAWDatarec-static)
+generateDA("MUON" "TRG" "${STATIC_DEPENDENCIES}")
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
+set(STATIC_DEPENDENCIES ESD-static MUONcalib-static MUONcore-static MUONmapping-static MUONraw-static RAWDatarec-static STEERBase-static)
+generateDA("MUON" "TRKGAIN" "${STATIC_DEPENDENCIES}")
 
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
+set(STATIC_DEPENDENCIES MUONcalib-static MUONcore-static MUONmapping-static MUONraw-static RAWDatabase-static RAWDatarec-static STEERBase-static)
+generateDA("MUON" "TRKOCC" "${STATIC_DEPENDENCIES}")
 
-# Generating the DA executable
-add_executable(MUONTRGda MUONTRGda.cxx)
-add_executable(MUONTRKGAINda MUONTRKGAINda.cxx)
-add_executable(MUONTRKOCCda MUONTRKOCCda.cxx)
-add_executable(MUONTRKPEDda MUONTRKPEDda.cxx)
-
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-target_link_libraries(MUONTRGda MUONraw MUONcalib MUONraw MUONcore MUONmapping RAWDatarec RAWDatarecOnline ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-target_link_libraries(MUONTRKGAINda MUONsim MUONshuttle MUONraw MUONmapping MUONcore MUONcalib HLTrec RAWDatarecOnline RAWDatarec ESD STEERBase ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-target_link_libraries(MUONTRKOCCda MUONraw MUONmapping MUONcore MUONcalib RAWDatarecOnline RAWDatarec RAWDatabase STEERBase ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-target_link_libraries(MUONTRKPEDda HLTrec MUONsim MUONshuttle MUONraw MUONmapping MUONcore MUONcalib RAWDatarecOnline RAWDatarec ESD STEERBase  ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra)
-
-# different flags
-set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-set_target_properties(MUONTRGda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(MUONTRGda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(MUONTRKGAINda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(MUONTRKGAINda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(MUONTRKOCCda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(MUONTRKOCCda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(MUONTRKPEDda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(MUONTRKPEDda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# Installation
-install(TARGETS MUONTRGda MUONTRKGAINda MUONTRKOCCda MUONTRKPEDda RUNTIME DESTINATION bin)
\ No newline at end of file
+set(STATIC_DEPENDENCIES ESD-static MUONcalib-static MUONcore-static MUONmapping-static MUONraw-static RAWDatarec-static STEERBase-static)
+generateDA("MUON" "TRKPED" "${STATIC_DEPENDENCIES}")
\ No newline at end of file
index 592658f..f1aa71e 100644 (file)
@@ -28,47 +28,15 @@ include_directories(
                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
                    )
 
+set(STATIC_DEPENDENCIES PHOSbase-static PHOSshuttle-static RAWDatabase-static RAWDatarec-static STEERBase-static)
+generateDA("PHOS" "BCM" "${STATIC_DEPENDENCIES}")
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
+set(STATIC_DEPENDENCIES PHOSbase-static PHOSshuttle-static RAWDatabase-static RAWDatarec-static STEERBase-static)
+generateDA("PHOS" "GAIN" "${STATIC_DEPENDENCIES}")
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
+set(STATIC_DEPENDENCIES PHOSbase-static PHOSshuttle-static RAWDatabase-static RAWDatarec-static STEERBase-static)
+generateDA("PHOS" "LED" "${STATIC_DEPENDENCIES}")
 
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
+set(STATIC_DEPENDENCIES RAWDatabase-static RAWDatarec-static STEERBase-static)
+generateDA("PHOS" "PED" "${STATIC_DEPENDENCIES}")
 
-# Generating the DA executable
-add_executable(PHOSBCMda PHOSBCMda.cxx) # 1
-add_executable(PHOSGAINda PHOSGAINda.cxx) # 2
-add_executable(PHOSLEDda PHOSLEDda.cxx) # 3
-add_executable(PHOSPEDda PHOSPEDda.cxx) # 4
-
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-target_link_libraries(PHOSBCMda PHOSbase-static PHOSshuttle-static RAWDatabase-static RAWDatarec-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1
-target_link_libraries(PHOSGAINda PHOSbase-static PHOSshuttle-static RAWDatabase-static RAWDatarec-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 2
-target_link_libraries(PHOSLEDda PHOSbase-static PHOSshuttle-static RAWDatabase-static RAWDatarec-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 3 
-target_link_libraries(PHOSPEDda RAWDatabase-static RAWDatarec-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 4
-
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-set_target_properties(PHOSBCMda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(PHOSBCMda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(PHOSGAINda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(PHOSGAINda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(PHOSLEDda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(PHOSLEDda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(PHOSPEDda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(PHOSPEDda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# Installation
-install(TARGETS PHOSBCMda PHOSGAINda PHOSLEDda PHOSPEDda RUNTIME DESTINATION bin)
\ No newline at end of file
index 5f0072c..93ddea5 100644 (file)
@@ -29,44 +29,10 @@ include_directories(
                    )
 
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
+setDAflags()
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
+set(STATIC_DEPENDENCIES CDB-static PMDrec-static RAWDatarec-static STEERBase-static)
+generateDA("PMD" "GAIN" "${STATIC_DEPENDENCIES}")
 
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
-
-# Generating the DA executable
-add_executable(PMDGAINda PMDGAINda.cxx) # 1
-add_executable(PMDPEDESTALda PMDPEDESTALda.cxx) # 2
-
-# Da information
-
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-target_link_libraries(PMDGAINda CDB-static PMDrec-static RAWDatarec-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1
-target_link_libraries(PMDPEDESTALda CDB-static PMDrec-static RAWDatarec-static STEERBase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 2
-
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-set_target_properties(PMDGAINda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(PMDGAINda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(PMDPEDESTALda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(PMDPEDESTALda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# Installation
-install(TARGETS PMDGAINda RUNTIME DESTINATION bin COMPONENT PMDGAIN)
-install(TARGETS PMDPEDESTALda RUNTIME DESTINATION bin COMPONENT PMDPEDESTAL)
-
-if(DARPM)
-    createDArpm("PMD" "GAIN")
-    createDArpm("PMD" "PEDESTAL")
-endif(DARPM)
\ No newline at end of file
+set(STATIC_DEPENDENCIES CDB-static PMDrec-static RAWDatarec-static STEERBase-static)
+generateDA("PMD" "PEDESTAL" "${STATIC_DEPENDENCIES}")
index 65dfccd..216cbcb 100644 (file)
@@ -27,42 +27,11 @@ include_directories(
                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
                    )
 
+set(STATIC_DEPENDENCIES RAWDatarec-static T0base-static)
+generateDA("T0" "Cosmic" "${STATIC_DEPENDENCIES}")
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
+set(STATIC_DEPENDENCIES RAWDatarec-static T0base-static)
+generateDA("T0" "Laser" "${STATIC_DEPENDENCIES}")
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
-
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
-
-# Generating the DA executable
-add_executable(T0Cosmicda T0Cosmicda.cxx) # 1
-add_executable(T0Laserda T0Laserda.cxx) # 2
-add_executable(T0Physda T0Physda.cxx) # 3
-
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-target_link_libraries(T0Cosmicda RAWDatarec-static T0base-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1
-target_link_libraries(T0Laserda RAWDatarec-static T0base-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 2
-target_link_libraries(T0Physda CDB-static RAWDatarec-static T0base-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 3
-
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-set_target_properties(T0Cosmicda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(T0Cosmicda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(T0Laserda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(T0Laserda PMDPEDESTALda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(T0Physda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(T0Physda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# Installation
-install(TARGETS T0Cosmicda T0Laserda T0Physda RUNTIME DESTINATION bin)
\ No newline at end of file
+set(STATIC_DEPENDENCIES CDB-static RAWDatarec-static T0base-static)
+generateDA("T0" "Phys" "${STATIC_DEPENDENCIES}")
index 2b7cbe1..b2f0199 100644 (file)
@@ -23,57 +23,18 @@ include_directories(
                     ${AliRoot_SOURCE_DIR}/TOF/TOFbase
                    )
 
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TOFbase-static)
+generateDA("TOF" "calib" "${STATIC_DEPENDENCIES}")
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TOFbase-static)
+generateDA("TOF" "" "${STATIC_DEPENDENCIES}")
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TOFbase-static)
+generateDA("TOF" "noise" "${STATIC_DEPENDENCIES}")
 
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TOFbase-static)
+generateDA("TOF" "physics" "${STATIC_DEPENDENCIES}")
 
-# Generating the DA executable
-add_executable(TOFcalibda TOFcalibda.cxx) # 1
-add_executable(TOFda TOFda.cxx) # 2
-add_executable(TOFnoiseda TOFnoiseda.cxx) # 3
-add_executable(TOFphysicsda TOFphysicsda.cxx) # 4
-add_executable(TOFpulserda TOFpulserda.cxx) # 5
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TOFbase-static)
+generateDA("TOF" "pulser" "${STATIC_DEPENDENCIES}")
 
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-target_link_libraries(TOFcalibda RAWDatarec-static STEERBase-static TOFbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1
-target_link_libraries(TOFda RAWDatarec-static STEERBase-static TOFbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 2
-target_link_libraries(TOFnoiseda RAWDatarec-static STEERBase-static TOFbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 3
-target_link_libraries(TOFphysicsda RAWDatarec-static STEERBase-static TOFbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 4
-target_link_libraries(TOFpulserda RAWDatarec-static STEERBase-static TOFbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 5
-
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-set_target_properties(TOFcalibda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(TOFcalibda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(TOFda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(TOFda PMDPEDESTALda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(TOFnoiseda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(TOFnoiseda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(TOFphysicsda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(TOFphysicsda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-set_target_properties(TOFpulserda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-set_target_properties(TOFpulserda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
-
-# Installation
-install(TARGETS TOFcalibda
-                TOFda
-                TOFnoiseda
-                TOFphysicsda
-                TOFpulserda
-        RUNTIME DESTINATION bin)
\ No newline at end of file
index 71301a0..abbbdae 100644 (file)
@@ -23,65 +23,20 @@ include_directories(
                     ${AliRoot_SOURCE_DIR}/TPC/TPCbase
                    )
 
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TPCbase-static)
+generateDA("TPC" "CE" "${STATIC_DEPENDENCIES}")
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TPCbase-static)
+generateDA("TPC" "CEnew" "${STATIC_DEPENDENCIES}")
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TPCbase-static)
+generateDA("TPC" "PEDESTAL" "${STATIC_DEPENDENCIES}")
 
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TPCbase-static)
+generateDA("TPC" "PULSER" "${STATIC_DEPENDENCIES}")
 
-# Generating the DA executable
-add_executable(TPCCEda TPCCEda.cxx) #1
-add_executable(TPCCEnewda TPCCEnewda.cxx) #2
-add_executable(TPCPEDESTALda TPCPEDESTALda.cxx) #3
-add_executable(TPCPULSERda TPCPULSERda.cxx) #4
-add_executable(TPCQAda TPCQAda.cxx) #5
-add_executable(TPCRAWda TPCRAWda.cxx) #6
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TPCbase-static)
+generateDA("TPC" "QA" "${STATIC_DEPENDENCIES}")
 
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-target_link_libraries(TPCCEda RAWDatarec-static STEERBase-static TPCbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} RootExtra Root) # 1
-target_link_libraries(TPCCEnewda RAWDatarec-static STEERBase-static TPCbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 2
-target_link_libraries(TPCPEDESTALda RAWDatarec-static STEERBase-static TPCbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 3
-target_link_libraries(TPCPULSERda RAWDatarec-static STEERBase-static TPCbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 4
-target_link_libraries(TPCQAda RAWDatarec-static STEERBase-static TPCbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 5
-target_link_libraries(TPCRAWda RAWDatarec-static STEERBase-static TPCbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 6
-
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-set_target_properties(TPCCEda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 1
-set_target_properties(TPCCEda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 1
-
-set_target_properties(TPCCEnewda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 2
-set_target_properties(TPCCEnewda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 2
-
-set_target_properties(TPCPEDESTALda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 3
-set_target_properties(TPCPEDESTALda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 3
-
-set_target_properties(TPCPULSERda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 4
-set_target_properties(TPCPULSERda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 4
-
-set_target_properties(TPCQAda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 5
-set_target_properties(TPCQAda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 5
-
-set_target_properties(TPCRAWda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 6
-set_target_properties(TPCRAWda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 6
-
-
-# Installation
-install(TARGETS 
-                TPCCEda
-                TPCCEnewda
-                TPCPEDESTALda
-                TPCPULSERda
-                TPCQAda
-                TPCRAWda
-        RUNTIME DESTINATION bin)
\ No newline at end of file
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TPCbase-static)
+generateDA("TPC" "RAW" "${STATIC_DEPENDENCIES}")
index 123a06b..09f3d00 100644 (file)
@@ -23,46 +23,11 @@ include_directories(
                     ${AliRoot_SOURCE_DIR}/TPC/TPCbase
                    )
 
+set(STATIC_DEPENDENCIES CDB-static RAWDatarec-static STEERBase-static TRDbase-static)
+generateDA("TRD" "HALFCHAMBERSTATUS" "${STATIC_DEPENDENCIES}")
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
+set(STATIC_DEPENDENCIES CDB-static RAWDatarec-static STEERBase-static TRDbase-static)
+generateDA("TRD" "PEDESTAL" "${STATIC_DEPENDENCIES}")
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
-
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
-
-# Generating the DA executable
-add_executable(TRDHALFCHAMBERSTATUSda TRDHALFCHAMBERSTATUSda.cxx) #1
-add_executable(TRDPEDESTALda TRDPEDESTALda.cxx) #2
-add_executable(TRDVDRIFTda TRDVDRIFTda.cxx) #3
-
-target_link_libraries(TRDHALFCHAMBERSTATUSda CDB-static RAWDatarec-static STEERBase-static TRDbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1
-target_link_libraries(TRDPEDESTALda CDB-static RAWDatarec-static STEERBase-static TRDbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 2
-target_link_libraries(TRDVDRIFTda RAWDatarec-static STEERBase-static TRDbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 3
-
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-set_target_properties(TRDHALFCHAMBERSTATUSda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 1
-set_target_properties(TRDHALFCHAMBERSTATUSda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 1
-
-set_target_properties(TRDPEDESTALda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 2
-set_target_properties(TRDPEDESTALda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 2
-
-set_target_properties(TRDVDRIFTda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 3
-set_target_properties(TRDVDRIFTda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 3
-
-# Installation
-install(TARGETS 
-                TRDHALFCHAMBERSTATUSda
-                TRDPEDESTALda
-                TRDVDRIFTda
-        RUNTIME DESTINATION bin)
\ No newline at end of file
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static TRDbase-static)
+generateDA("TRD" "VDRIFT" "${STATIC_DEPENDENCIES}")
index a096473..8a86322 100644 (file)
@@ -21,52 +21,14 @@ include_directories(
                    )
 
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static VZEROrec-static)
+generateDA("VZERO" "CHANNELDELAYTUNING" "${STATIC_DEPENDENCIES}")
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static VZEROrec-static)
+generateDA("VZERO" "" "${STATIC_DEPENDENCIES}")
 
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static VZEROrec-static)
+generateDA("VZERO" "INTEGRATIONGATETUNING" "${STATIC_DEPENDENCIES}")
 
-# Generating the DA executable
-add_executable(VZEROCHANNELDELAYTUNINGda VZEROCHANNELDELAYTUNINGda.cxx) #1
-add_executable(VZEROda VZEROda.cxx) #2
-add_executable(VZEROINTEGRATIONGATETUNINGda VZEROINTEGRATIONGATETUNINGda.cxx) #3
-add_executable(VZEROPbPbda VZEROPbPbda.cxx) #4
-
-target_link_libraries(VZEROCHANNELDELAYTUNINGda RAWDatarec-static STEERBase-static VZEROrec-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1
-target_link_libraries(VZEROda RAWDatarec-static STEERBase-static VZEROrec-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 2
-target_link_libraries(VZEROINTEGRATIONGATETUNINGda RAWDatarec-static STEERBase-static VZEROrec-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 3
-target_link_libraries(VZEROPbPbda RAWDatarec-static STEERBase-static VZEROrec-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 4
-
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-# different flags
-set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-set_target_properties(VZEROCHANNELDELAYTUNINGda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 1
-set_target_properties(VZEROCHANNELDELAYTUNINGda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 1
-
-set_target_properties(VZEROda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 2
- set_target_properties(VZEROda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 2
-set_target_properties(VZEROINTEGRATIONGATETUNINGda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 3
-set_target_properties(VZEROINTEGRATIONGATETUNINGda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 3
-
-set_target_properties(VZEROPbPbda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 4
-set_target_properties(VZEROPbPbda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 4
-
-
-# Installation
-install(TARGETS 
-                VZEROCHANNELDELAYTUNINGda
-                VZEROda
-                VZEROINTEGRATIONGATETUNINGda
-                VZEROPbPbda
-        RUNTIME DESTINATION bin)
\ No newline at end of file
+set(STATIC_DEPENDENCIES RAWDatarec-static STEERBase-static VZEROrec-static)
+generateDA("VZERO" "PbPb" "${STATIC_DEPENDENCIES}")
index 6f8ac5b..575366f 100644 (file)
@@ -20,57 +20,18 @@ include_directories(${AliRoot_SOURCE_DIR}/ZDC/DA)
 include_directories(
                    )
 
+set(STATIC_DEPENDENCIES RAWDatabase-static RAWDatarec-static ZDCbase-static)
+generateDA("ZDC" "CALIBMB" "${STATIC_DEPENDENCIES}")
 
-# DIM
-link_directories(${DIMDIR}/${ODIR})
+set(STATIC_DEPENDENCIES RAWDatabase-static RAWDatarec-static ZDCbase-static)
+generateDA("ZDC" "EMD" "${STATIC_DEPENDENCIES}")
 
-#daqDA flags
-include_directories(${daqDA})
-link_directories(${daqDA})
+set(STATIC_DEPENDENCIES  RAWDatabase-static RAWDatarec-static ZDCbase-static)
+generateDA("ZDC" "LASER" "${STATIC_DEPENDENCIES}")
 
-# AMORE definitions
-add_definitions(${AMORE_DEFINITIONS})
-include_directories(${AMORE_INCLUDE_DIR})
+set(STATIC_DEPENDENCIES RAWDatabase-static RAWDatarec-static ZDCbase-static)
+generateDA("ZDC" "MAPPING" "${STATIC_DEPENDENCIES}")
 
-# Generating the DA executable
-add_executable(ZDCCALIBMBda ZDCCALIBMBda.cxx) #1
-add_executable(ZDCEMDda ZDCEMDda.cxx) #2
-add_executable(ZDCLASERda ZDCLASERda.cxx) #3
-add_executable(ZDCMAPPINGda ZDCMAPPINGda.cxx) #4
-add_executable(ZDCPEDESTALda ZDCPEDESTALda.cxx) #5
+set(STATIC_DEPENDENCIES RAWDatabase-static RAWDatarec-static ZDCbase-static)
+generateDA("ZDC" "PEDESTAL" "${STATIC_DEPENDENCIES}")
 
-target_link_libraries(ZDCCALIBMBda RAWDatabase-static RAWDatarec-static ZDCbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1
-target_link_libraries(ZDCEMDda RAWDatabase-static RAWDatarec-static ZDCbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 2
-target_link_libraries(ZDCLASERda RAWDatabase-static RAWDatarec-static ZDCbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 3
-target_link_libraries(ZDCMAPPINGda RAWDatabase-static RAWDatarec-static ZDCbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 4
-target_link_libraries(ZDCPEDESTALda RAWDatabase-static RAWDatarec-static ZDCbase-static ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 5
-
-set(MODULE_COMPILE_FLAGS)
-set(MODULE_LINK_FLAGS)
-
-# different flags
-set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS} ${AMORE_CFLAGS}")
-set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
-
-set_target_properties(ZDCCALIBMBda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 1
-set_target_properties(ZDCCALIBMBda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 1
-
-set_target_properties(ZDCEMDda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 2
-set_target_properties(ZDCEMDda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 2
-set_target_properties(ZDCLASERda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 3
-set_target_properties(ZDCLASERda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 3
-
-set_target_properties(ZDCMAPPINGda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 4
-set_target_properties(ZDCMAPPINGda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 4
-
-set_target_properties(ZDCPEDESTALda PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS}) # 5
-set_target_properties(ZDCPEDESTALda PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") # 5
-
-# Installation
-install(TARGETS 
-                ZDCCALIBMBda
-                ZDCEMDda
-                ZDCLASERda
-                ZDCMAPPINGda
-                ZDCPEDESTALda
-        RUNTIME DESTINATION bin)
\ No newline at end of file
index 27a6e39..a99f2d7 100644 (file)
@@ -107,43 +107,113 @@ endmacro(generate_static_dependencies)
 #########################
 # DA utilities
 #########################
-# Extract DA information to be inserted into the rpm
-function(getDAinfo _info _detector _daname info)
-    file(STRINGS "${_detector}${_daname}da.cxx" tmpinfo REGEX "${info}:")
-    string(REPLACE "${info}:\ " "" tmpinfo ${tmpinfo})
-    set(${_info} ${tmpinfo} PARENT_SCOPE)
-endfunction()
+
+# Extract the first comment from a DA file
+# Find the position for first /* and */ and extract the substring
+macro(getDAdescription _detector _daname)
+    # Reading the file into a string
+    file(READ "${_detector}${_daname}da.cxx" tmpinfo)
+    
+    # Find the first occurance of /* */
+    string(FIND "${tmpinfo}" "/*" _first_position)
+    string(FIND "${tmpinfo}" "*/" _second_position)
+    
+    # Adding and removing 2 characters to remove /* */
+    math(EXPR _first_position ${_first_position}+2)
+    math(EXPR _second_position ${_second_position}-2)
+    
+    # Generating the length of the comment in order to take out the description
+    math(EXPR _desc_length ${_second_position}-${_first_position})
+    
+    if(${_desc_length} EQUAL 0 OR ${_desc_length} LESS 0)
+        message(FATAL_ERROR "{_detector}${_daname}da.cxx does not contain a description. Please add the description as the first /*comment*/ in the file")
+    else()
+        string(SUBSTRING "${tmpinfo}" ${_first_position}  ${_second_position} _da_description)
+        string(STRIP ${_da_description} _da_description)
+        
+        # The variable can be accesed by the parent
+        set(RPM_DESCRIPTION ${_da_description})
+    endif()
+endmacro()
+
+# Set the compilation flags
+macro(setDAflags)
+    # DIM
+    link_directories(${DIMDIR}/${ODIR})
+
+    #daqDA flags
+    include_directories(${daqDA})
+    link_directories(${daqDA})
+
+    # AMORE definitions
+    add_definitions(${AMORE_DEFINITIONS})
+    include_directories(${AMORE_INCLUDE_DIR})
+
+endmacro()
+
+# Generate a DA
+macro(generateDA DETECTOR ALGORITHM STATIC_DEPENDENCIES)
+    setDAflags()
+
+    # Generating the DA executable
+    add_executable(${DETECTOR}${ALGORITHM}da ${DETECTOR}${ALGORITHM}da.cxx) #
+
+    # DA flags and linking information
+    set(MODULE_COMPILE_FLAGS)
+    set(MODULE_LINK_FLAGS)
+
+    target_link_libraries(${DETECTOR}${ALGORITHM}da ${STATIC_DEPENDENCIES} ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1
+
+    # different flags
+    set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
+    set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")
+
+    set_target_properties(${DETECTOR}${ALGORITHM}da PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
+    set_target_properties(${DETECTOR}${ALGORITHM}da PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
+
+    # Installation
+    install(TARGETS ${DETECTOR}${ALGORITHM}da RUNTIME DESTINATION bin)
+    
+    if(DARPM)
+        createDArpm("${DETECTOR}" "${ALGORITHM}")
+    endif(DARPM)
+endmacro()
 
 # DA rpm creation
 macro(createDArpm DETECTOR ALGORITHM)
-    getDAinfo(contact "${DETECTOR}" "${ALGORITHM}" "Contact")
-    getDAinfo(link "${DETECTOR}" "${ALGORITHM}" "Link")
-    getDAinfo(refrun "${DETECTOR}" "${ALGORITHM}" "Reference Run")
-    getDAinfo(runtype "${DETECTOR}" "${ALGORITHM}" "Run Type")
-    getDAinfo(datype "${DETECTOR}" "${ALGORITHM}" "DA Type")
-    getDAinfo(evennr "${DETECTOR}" "${ALGORITHM}" "Number of events needed")
-    getDAinfo(ifiles "${DETECTOR}" "${ALGORITHM}" "Input Files")
-    getDAinfo(ofiles "${DETECTOR}" "${ALGORITHM}" "Output Files")
-    getDAinfo(trigger "${DETECTOR}" "${ALGORITHM}" "Trigger types used")
-    set(RPM_DESCRIPTION "contact: ${contact}
-Link:${link}
-Reference run:${refrun}
-Run Type:${runtype}
-DA Type:${datype}
-Number of events needed: ${evennr}
-Input Files:${ifiles}
-Output Files:${ofiles}
-Trigger types used:${trigger}")
+    getDAdescription("${DETECTOR}" "${ALGORITHM}")
 
     set(DA_EXECUTABLE "${DETECTOR}${ALGORITHM}da")
-    set(DETECTOR ${DETECTOR})
-    set(ALGORITHM ${ALGORITHM})
-    configure_file("${AliRoot_SOURCE_DIR}/cmake/da.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${ALGORITHM}-da.spec" @ONLY)
+    set(DETECTOR "${DETECTOR}")
+    set(ALGORITHM "${ALGORITHM}")
+    set(RPM_DESCRIPTION ${RPM_DESCRIPTION})
+    
+    if(ALGORITHM STREQUAL "")
+        set(_ALGORITHM "none")
+        set(DA_PREFIX "opt/daqDA-${DETECTOR}")
+        set(DA_NAME "daqDA-${DETECTOR}")
+    else()
+        set(_ALGORITHM ${ALGORITHM})
+        set(DA_PREFIX "opt/daqDA-${DETECTOR}-${ALGORITHM}")
+        set(DA_NAME "daqDA-${DETECTOR}-${ALGORITHM}")
+    endif()
+
+    configure_file("${AliRoot_SOURCE_DIR}/cmake/da.spec.in" "${_ALGORITHM}-da.spec" @ONLY)
 
     add_custom_command(TARGET ${DETECTOR}${ALGORITHM}da POST_BUILD
-                       COMMAND mkdir ARGS -p da-${ALGORITHM}-rpm/opt/daqDA-${DETECTOR}-${ALGORITHM}/
-                       COMMAND cp ARGS ${DETECTOR}${ALGORITHM}da da-${ALGORITHM}-rpm/opt/daqDA-${DETECTOR}-${ALGORITHM}/
-                       COMMAND rpmbuild ARGS --verbose --define "_topdir ${CMAKE_CURRENT_BINARY_DIR}" --define "%buildroot ${CMAKE_CURRENT_BINARY_DIR}/da-${ALGORITHM}-rpm" -bb ${ALGORITHM}-da.spec
+                       COMMAND mkdir ARGS -p da-${_ALGORITHM}-rpm/root/${DA_PREFIX}/
+                       COMMAND cp ARGS ${DETECTOR}${ALGORITHM}da da-${_ALGORITHM}-rpm/root/${DA_PREFIX}/
+                       COMMAND rpmbuild ARGS --verbose --define "_topdir ${CMAKE_CURRENT_BINARY_DIR}/da-${_ALGORITHM}-rpm" --define "%buildroot ${CMAKE_CURRENT_BINARY_DIR}/da-${_ALGORITHM}-rpm/root" -bb ${_ALGORITHM}-da.spec
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} VERBATIM
+                       COMMENT "RPM creation for ${DETECTOR}-${_ALGORITHM}"
     )
+    
+    # make clean will remove also the rpm folder
+    # Retrive the current list of file to be deleted - set_directory_property is overwriting, not adding to the list
+    get_directory_property(_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
+    set(_clean_files da-${_ALGORITHM}-rpm  ${_clean_files})
+    set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${_clean_files}")
+    
+    # install RPM into $CMAKE_INSTALL_PREFIX/darpms
+    install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/da-${_ALGORITHM}-rpm/RPMS/ DESTINATION darpms PATTERN "\\.rpm")
 endmacro()
\ No newline at end of file
index 6eaba25..3adedef 100644 (file)
@@ -1,12 +1,13 @@
 # RPM specfile for  Detector Algorithm
 Summary: @DETECTOR@ Detector Algorithm
-Name: daqDA-@DETECTOR@-@ALGORITHM@
+Name: @DA_NAME@
 Version: @ALIROOT_VERSION_RPM@
 Release: @GIT_SHORT_SHA1@
 License: CERN Alice DAQ/Offine
 Group: Applications/Alice
 Prefix: /opt/%{name}
-BuildRoot: /@CMAKE_CURRENT_BINARY_DIR@/da-@ALGORITHM@-rpm
+BuildRoot: /@CMAKE_CURRENT_BINARY_DIR@/da-@_ALGORITHM@-rpm/root
+#
 
 # automatic dependencies
 AutoReqProv: yes