CMake: DA rpm creation, enable more detectors from the same folder
authoragrigora <alina.grigoras@cern.ch>
Mon, 2 Mar 2015 15:30:38 +0000 (16:30 +0100)
committeragrigora <alina.grigoras@cern.ch>
Mon, 2 Mar 2015 15:30:38 +0000 (16:30 +0100)
Possibility to create DAs for more than one detector from a DA folder
ALIROOT-5850

PHOS/DA/CMakeLists.txt
PHOS/DA/CPVBCMda.cxx [moved from PHOS/DA/PHOSCPVBCMda.cxx with 100% similarity]
PHOS/DA/CPVGAINda.cxx [moved from PHOS/DA/PHOSCPVGAINda.cxx with 100% similarity]
PHOS/DA/CPVPEDda.cxx [moved from PHOS/DA/PHOSCPVPEDda.cxx with 100% similarity]
cmake/CMakeALICE.cmake
cmake/da.spec.in

index 27dc958..7079a03 100644 (file)
@@ -41,10 +41,10 @@ set(STATIC_DEPENDENCIES RAWDatabase-static RAWDatarec-static STEERBase-static)
 generateDA("PHOS" "PED" "${STATIC_DEPENDENCIES}")
 
 set(STATIC_DEPENDENCIES PHOSbase-static RAWDatabase-static RAWDatarec-static STEERBase-static)
-generateDA("PHOS" "CPVPED" "${STATIC_DEPENDENCIES}")
+generateDA("CPV" "PED" "${STATIC_DEPENDENCIES}")
 
 set(STATIC_DEPENDENCIES PHOSbase-static RAWDatabase-static RAWDatarec-static STEERBase-static)
-generateDA("PHOS" "CPVBCM" "${STATIC_DEPENDENCIES}")
+generateDA("CPV" "BCM" "${STATIC_DEPENDENCIES}")
 
 set(STATIC_DEPENDENCIES PHOSbase-static RAWDatabase-static RAWDatarec-static STEERBase-static)
-generateDA("PHOS" "CPVGAIN" "${STATIC_DEPENDENCIES}")
+generateDA("CPV" "GAIN" "${STATIC_DEPENDENCIES}")
index e9c90e1..60a12b4 100644 (file)
@@ -218,12 +218,12 @@ macro(createDArpm DETECTOR ALGORITHM)
         set(DA_NAME "daqDA-${DETECTOR}-${ALGORITHM}")
     endif()
 
-    configure_file("${AliRoot_SOURCE_DIR}/cmake/da.spec.in" "${_ALGORITHM}-da.spec" @ONLY)
+    configure_file("${AliRoot_SOURCE_DIR}/cmake/da.spec.in" "${DETECTOR}${_ALGORITHM}-da.spec" @ONLY)
 
     add_custom_command(TARGET ${DETECTOR}${ALGORITHM}da.exe POST_BUILD
-                       COMMAND mkdir ARGS -p da-${_ALGORITHM}-rpm/root/${DA_PREFIX}/
-                       COMMAND cp ARGS ${DETECTOR}${ALGORITHM}da.exe 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
+                       COMMAND mkdir ARGS -p da-${DETECTOR}${_ALGORITHM}-rpm/root/${DA_PREFIX}/
+                       COMMAND cp ARGS ${DETECTOR}${ALGORITHM}da.exe da-${DETECTOR}${_ALGORITHM}-rpm/root/${DA_PREFIX}/
+                       COMMAND rpmbuild ARGS --verbose --define "_topdir ${CMAKE_CURRENT_BINARY_DIR}/da-${DETECTOR}${_ALGORITHM}-rpm" --define "%buildroot ${CMAKE_CURRENT_BINARY_DIR}/da-${DETECTOR}${_ALGORITHM}-rpm/root" -bb ${DETECTOR}${_ALGORITHM}-da.spec
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} VERBATIM
                        COMMENT "RPM creation for ${DETECTOR}-${_ALGORITHM}"
     )
@@ -231,11 +231,11 @@ macro(createDArpm 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(_clean_files da-${DETECTOR}${_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")
+    install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/da-${DETECTOR}${_ALGORITHM}-rpm/RPMS/ DESTINATION darpms PATTERN "\\.rpm")
 endmacro()
 
 
index 1e87808..270e4d3 100644 (file)
@@ -6,7 +6,7 @@ Release: @GIT_SHORT_SHA1@
 License: CERN Alice DAQ/Offine
 Group: Applications/Alice
 Prefix: /opt/%{name}
-BuildRoot: /@CMAKE_CURRENT_BINARY_DIR@/da-@_ALGORITHM@-rpm/root
+BuildRoot: /@CMAKE_CURRENT_BINARY_DIR@/da-@DETECTOR@@_ALGORITHM@-rpm/root
 Packager: Alina Grigoras <alina.gabriela.grigoras@cern.ch>
 
 # automatic dependencies