Skip to content
Snippets Groups Projects
Commit 31c13d83 authored by Administrator's avatar Administrator
Browse files

Install MQ startup scripts

Create MQ startup scripts to be installed already at the configuration stage
and store the in the build tree. The difference between the scripts used in
the build tree and the scripts finally installed are the hardcoded directory
information inside. In the scripts to be used inside the build directory this
links to the source and the build directories whereas it links to the
installation directory in case of the scripts which are installed.
Copy the scripts during installation to the correct directory.
Install the MQ executables in the same directory structure as in the build
directory.
parent 940afe3e
No related branches found
No related tags found
1 merge request!731Install MQ startup scripts and fix installation of MQ executables (#2403)
...@@ -62,6 +62,11 @@ set(DEPENDENCIES_ALL ...@@ -62,6 +62,11 @@ set(DEPENDENCIES_ALL
${BOOST_LIBS} ${BOOST_LIBS}
) )
# Set the install path within the build directory
set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/histogramServer")
# Set the install path within the installation directory
set(BIN_DESTINATION bin/MQ/histogramServer)
set(EXE_NAME HistoServer) set(EXE_NAME HistoServer)
set(SRCS CbmHistoServer.cxx runCbmHistoServer.cxx) set(SRCS CbmHistoServer.cxx runCbmHistoServer.cxx)
set(DEPENDENCIES set(DEPENDENCIES
...@@ -76,8 +81,6 @@ set(DEPENDENCIES ...@@ -76,8 +81,6 @@ set(DEPENDENCIES
) )
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/histogramServer")
set(EXE_NAME MqHistoServer) set(EXE_NAME MqHistoServer)
set(SRCS CbmMqHistoServer.cxx runCbmMqHistoServer.cxx) set(SRCS CbmMqHistoServer.cxx runCbmMqHistoServer.cxx)
set(DEPENDENCIES set(DEPENDENCIES
......
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/startMQSamplerUnpackerParserverHitBuilder.sh.in ${CMAKE_BINARY_DIR}/bin/MQ/topologies/startMQSamplerUnpackerParserverHitBuilder.sh) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/startMQSamplerUnpackerParserverHitBuilder.sh.in ${CMAKE_BINARY_DIR}/bin/MQ/topologies/startMQSamplerUnpackerParserverHitBuilder.sh)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/startMQ_Mcbm.sh.in ${CMAKE_BINARY_DIR}/bin/MQ/topologies/startMQ_Mcbm.sh) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/startMQ_Mcbm.sh.in ${CMAKE_BINARY_DIR}/bin/MQ/topologies/startMQ_Mcbm.sh)
set(INCLUDE_DIRECTORIES set(INCLUDE_DIRECTORIES
...@@ -38,7 +37,10 @@ set(LINK_DIRECTORIES ...@@ -38,7 +37,10 @@ set(LINK_DIRECTORIES
link_directories(${LINK_DIRECTORIES}) link_directories(${LINK_DIRECTORIES})
# Set the install path within the build directory
set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/hitbuilder") set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/hitbuilder")
# Set the install path within the installation directory
set(BIN_DESTINATION bin/MQ/hitbuilder)
Set(BOOST_LIBS Set(BOOST_LIBS
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
...@@ -86,3 +88,21 @@ set(DEPENDENCIES ...@@ -86,3 +88,21 @@ set(DEPENDENCIES
) )
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
# Set the correct variables for the installation
set(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/cbmroot)
set(MY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_CURRENT_SOURCE_DIR ${VMCWORKDIR}/input)
set(TMPDIR "${CMAKE_BINARY_DIR}")
set(CMAKE_BINARY_DIR ${CMAKE_INSTALL_PREFIX})
# Configure file for installation directory
configure_file(${MY_SOURCE_DIR}/startMQSamplerUnpackerParserverHitBuilder.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerUnpackerParserverHitBuilder.sh)
configure_file(${MY_SOURCE_DIR}/startMQ_Mcbm.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQ_Mcbm.sh)
install(PROGRAMS ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerUnpackerParserverHitBuilder.sh
${TMPDIR}/bin/MQ/topologies/install/startMQ_Mcbm.sh
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/MQ/topologies
)
...@@ -74,7 +74,10 @@ set(LINK_DIRECTORIES ...@@ -74,7 +74,10 @@ set(LINK_DIRECTORIES
link_directories(${LINK_DIRECTORIES}) link_directories(${LINK_DIRECTORIES})
# Set the install path within the build directory
set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/mcbm") set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/mcbm")
# Set the install path within the installation directory
set(BIN_DESTINATION bin/MQ/mcbm)
Set(BOOST_LIBS Set(BOOST_LIBS
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
...@@ -115,7 +118,6 @@ set(DEPENDENCIES ...@@ -115,7 +118,6 @@ set(DEPENDENCIES
Hist Hist
RHTTP RHTTP
) )
#GENERATE_LIBRARY()
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
set(EXE_NAME McbmMonitorPulser) set(EXE_NAME McbmMonitorPulser)
...@@ -136,7 +138,6 @@ set(DEPENDENCIES ...@@ -136,7 +138,6 @@ set(DEPENDENCIES
Hist Hist
RHTTP RHTTP
) )
#GENERATE_LIBRARY()
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
set(EXE_NAME BuildRawEvents) set(EXE_NAME BuildRawEvents)
...@@ -163,7 +164,6 @@ set(DEPENDENCIES ...@@ -163,7 +164,6 @@ set(DEPENDENCIES
Hist Hist
RHTTP RHTTP
) )
#GENERATE_LIBRARY()
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
...@@ -185,7 +185,6 @@ set(DEPENDENCIES ...@@ -185,7 +185,6 @@ set(DEPENDENCIES
Hist Hist
RHTTP RHTTP
) )
#GENERATE_LIBRARY()
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
set(EXE_NAME McbmEventSink) set(EXE_NAME McbmEventSink)
...@@ -207,7 +206,6 @@ set(DEPENDENCIES ...@@ -207,7 +206,6 @@ set(DEPENDENCIES
Hist Hist
RHTTP RHTTP
) )
#GENERATE_LIBRARY()
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
...@@ -311,7 +309,6 @@ set(DEPENDENCIES ...@@ -311,7 +309,6 @@ set(DEPENDENCIES
Hist Hist
RHTTP RHTTP
) )
#GENERATE_LIBRARY()
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
if (${CMAKE_CXX_STANDARD} EQUAL 17) if (${CMAKE_CXX_STANDARD} EQUAL 17)
...@@ -337,3 +334,28 @@ if (${CMAKE_CXX_STANDARD} EQUAL 17) ...@@ -337,3 +334,28 @@ if (${CMAKE_CXX_STANDARD} EQUAL 17)
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
endif() endif()
# Set the correct variables for the installation
set(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/cbmroot)
set(MY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_CURRENT_SOURCE_DIR ${VMCWORKDIR}/input)
set(TMPDIR "${CMAKE_BINARY_DIR}")
set(CMAKE_BINARY_DIR ${CMAKE_INSTALL_PREFIX})
# Configure file for installation directory
configure_file(${MY_SOURCE_DIR}/startMQMcbmPulserMonitor2020.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQMcbmPulserMonitor2020.sh)
configure_file(${MY_SOURCE_DIR}/startMQMcbmEvtBuilderWin2020.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQMcbmEvtBuilderWin2020.sh)
configure_file(${MY_SOURCE_DIR}/startMQBuildRawEvents.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQBuildRawEvents.sh)
configure_file(${MY_SOURCE_DIR}/startBuildRawEvents2021.sh.in ${TMPDIR}/bin/MQ/topologies/install/startBuildRawEvents2021.sh)
configure_file(${MY_SOURCE_DIR}/startBuildRawEventsCosmics2021.sh.in ${TMPDIR}/bin/MQ/topologies/install/startBuildRawEventsCosmics2021.sh)
configure_file(${MY_SOURCE_DIR}/startEventBuilder.sh.in ${TMPDIR}/bin/MQ/topologies/startEventBuilder.sh)
install(PROGRAMS ${TMPDIR}/bin/MQ/topologies/install/startMQMcbmPulserMonitor2020.sh
${TMPDIR}/bin/MQ/topologies/install/startMQMcbmEvtBuilderWin2020.sh
${TMPDIR}/bin/MQ/topologies/install/startMQBuildRawEvents.sh
${TMPDIR}/bin/MQ/topologies/install/startBuildRawEvents2021.sh
${TMPDIR}/bin/MQ/topologies/install/startBuildRawEventsCosmics2021.sh
${TMPDIR}/bin/MQ/topologies/install/startEventBuilder.sh
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/MQ/topologies
)
...@@ -47,7 +47,10 @@ set(LINK_DIRECTORIES ...@@ -47,7 +47,10 @@ set(LINK_DIRECTORIES
link_directories(${LINK_DIRECTORIES}) link_directories(${LINK_DIRECTORIES})
# Set the install path within the build directory
set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/monitor") set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/monitor")
# Set the install path within the installation directory
set(BIN_DESTINATION bin/MQ/monitor)
Set(BOOST_LIBS Set(BOOST_LIBS
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
...@@ -90,7 +93,6 @@ set(DEPENDENCIES ...@@ -90,7 +93,6 @@ set(DEPENDENCIES
Hist Hist
RHTTP RHTTP
) )
#GENERATE_LIBRARY()
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
set(EXE_NAME TofMonitorMcbm2018) set(EXE_NAME TofMonitorMcbm2018)
...@@ -111,7 +113,6 @@ set(DEPENDENCIES ...@@ -111,7 +113,6 @@ set(DEPENDENCIES
Hist Hist
RHTTP RHTTP
) )
#GENERATE_LIBRARY()
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
set(EXE_NAME T0MonitorReqMcbm) set(EXE_NAME T0MonitorReqMcbm)
...@@ -132,7 +133,6 @@ set(DEPENDENCIES ...@@ -132,7 +133,6 @@ set(DEPENDENCIES
Hist Hist
RHTTP RHTTP
) )
#GENERATE_LIBRARY()
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
set(EXE_NAME TofMonitorReqMcbm) set(EXE_NAME TofMonitorReqMcbm)
...@@ -153,7 +153,6 @@ set(DEPENDENCIES ...@@ -153,7 +153,6 @@ set(DEPENDENCIES
Hist Hist
RHTTP RHTTP
) )
#GENERATE_LIBRARY()
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
set(EXE_NAME PsdMonitorMcbm2018) set(EXE_NAME PsdMonitorMcbm2018)
...@@ -174,6 +173,37 @@ set(DEPENDENCIES ...@@ -174,6 +173,37 @@ set(DEPENDENCIES
Hist Hist
RHTTP RHTTP
) )
#GENERATE_LIBRARY()
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
# Install scripts and input file
if(EXISTS ${VMCWORKDIR}/input/tofget4_hd2018.tsa)
install(FILES ${VMCWORKDIR}/input/tofget4_hd2018.tsa
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cbmroot/input
)
endif()
# Set the correct variables for the installation
set(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/cbmroot)
set(MY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_CURRENT_SOURCE_DIR ${VMCWORKDIR}/input)
set(TMPDIR "${CMAKE_BINARY_DIR}")
set(CMAKE_BINARY_DIR ${CMAKE_INSTALL_PREFIX})
# Configure file for installation directory
configure_file(${MY_SOURCE_DIR}/startMQSamplerMonitor.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerMonitor.sh)
configure_file(${MY_SOURCE_DIR}/startMQSamplerT0Monitor2020.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerT0Monitor2020.sh)
configure_file(${MY_SOURCE_DIR}/startMQSamplerTofMonitor2020.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerTofMonitor2020.sh)
configure_file(${MY_SOURCE_DIR}/startMQSamplerT0Monitor2021.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerT0Monitor2021.sh)
configure_file(${MY_SOURCE_DIR}/startMQSamplerTofMonitor2021.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerTofMonitor2021.sh)
configure_file(${MY_SOURCE_DIR}/startMQSamplerPsdMonitor2021.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerPsdMonitor2021.sh)
install(PROGRAMS ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerMonitor.sh
${TMPDIR}/bin/MQ/topologies/install/startMQSamplerT0Monitor2020.sh
${TMPDIR}/bin/MQ/topologies/install/startMQSamplerTofMonitor2020.sh
${TMPDIR}/bin/MQ/topologies/install/startMQSamplerT0Monitor2021.sh
${TMPDIR}/bin/MQ/topologies/install/startMQSamplerTofMonitor2021.sh
${TMPDIR}/bin/MQ/topologies/install/startMQSamplerPsdMonitor2021.sh
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/MQ/topologies
)
...@@ -27,7 +27,10 @@ Set(LINK_DIRECTORIES ...@@ -27,7 +27,10 @@ Set(LINK_DIRECTORIES
Link_Directories(${LINK_DIRECTORIES}) Link_Directories(${LINK_DIRECTORIES})
# Set the install path within the build directory
set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/parmq") set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/parmq")
# Set the install path within the installation directory
set(BIN_DESTINATION bin/MQ/parmq)
Set(BOOST_LIBS Set(BOOST_LIBS
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
......
...@@ -28,7 +28,10 @@ set(LINK_DIRECTORIES ...@@ -28,7 +28,10 @@ set(LINK_DIRECTORIES
link_directories(${LINK_DIRECTORIES}) link_directories(${LINK_DIRECTORIES})
# Set the install path within the build directory
set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/sink") set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/sink")
# Set the install path within the installation directory
set(BIN_DESTINATION bin/MQ/sink)
Set(BOOST_LIBS Set(BOOST_LIBS
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
...@@ -71,3 +74,25 @@ set(DEPENDENCIES ...@@ -71,3 +74,25 @@ set(DEPENDENCIES
) )
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
# Install scripts and input file
if(EXISTS ${VMCWORKDIR}/input/tofget4_hd2018.tsa)
install(FILES ${VMCWORKDIR}/input/tofget4_hd2018.tsa
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cbmroot/input
)
endif()
# Set the correct variables for the installation
set(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/cbmroot)
set(MY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_CURRENT_SOURCE_DIR ${VMCWORKDIR}/input)
set(TMPDIR "${CMAKE_BINARY_DIR}")
set(CMAKE_BINARY_DIR ${CMAKE_INSTALL_PREFIX})
# Configure file for installation directory
configure_file(${MY_SOURCE_DIR}/startMQSamplerSink.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerSink.sh)
install(PROGRAMS ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerSink.sh
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/MQ/topologies
)
...@@ -42,7 +42,10 @@ set(LINK_DIRECTORIES ...@@ -42,7 +42,10 @@ set(LINK_DIRECTORIES
link_directories(${LINK_DIRECTORIES}) link_directories(${LINK_DIRECTORIES})
# Set the install path within the build directory
set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/source") set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/MQ/source")
# Set the install path within the installation directory
set(BIN_DESTINATION bin/MQ/source)
Set(BOOST_LIBS Set(BOOST_LIBS
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
...@@ -190,3 +193,28 @@ set(DEPENDENCIES ...@@ -190,3 +193,28 @@ set(DEPENDENCIES
RIO RIO
) )
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
# Install scripts and input file
if(EXISTS ${VMCWORKDIR}/input/tofget4_hd2018.tsa)
install(FILES ${VMCWORKDIR}/input/tofget4_hd2018.tsa
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cbmroot/input
)
endif()
# Set the correct variables for the installation
set(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/cbmroot)
set(MY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_CURRENT_SOURCE_DIR ${VMCWORKDIR}/input)
set(TMPDIR "${CMAKE_BINARY_DIR}")
set(CMAKE_BINARY_DIR ${CMAKE_INSTALL_PREFIX})
# Configure file for installation directory
configure_file(${MY_SOURCE_DIR}/startMQInfo.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQInfo.sh)
configure_file(${MY_SOURCE_DIR}/startMQSampler.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQSampler.sh)
install(PROGRAMS ${TMPDIR}/bin/MQ/topologies/install/startMQInfo.sh
${TMPDIR}/bin/MQ/topologies/install/startMQSampler.sh
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/MQ/topologies
)
...@@ -83,5 +83,34 @@ set(DEPENDENCIES ...@@ -83,5 +83,34 @@ set(DEPENDENCIES
Net Net
Hist Hist
) )
# set the install dir
set(BIN_DESTINATION bin/MQ/unpacker)
GENERATE_EXECUTABLE() GENERATE_EXECUTABLE()
# Install script and input file(s)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/MapTofHdCosmics_v18d.par
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cbmroot/input
)
if(EXISTS ${VMCWORKDIR}/input/tofget4_hd2018.tsa)
install(FILES ${VMCWORKDIR}/input/tofget4_hd2018.tsa
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cbmroot/input
)
endif()
# Set the correct variables for the installation
set(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/cbmroot)
set(MY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_CURRENT_SOURCE_DIR ${VMCWORKDIR}/input)
set(TMPDIR "${CMAKE_BINARY_DIR}")
set(CMAKE_BINARY_DIR ${CMAKE_INSTALL_PREFIX})
# Configure file for installation directory
configure_file(${MY_SOURCE_DIR}/startMQSamplerUnpackerParserver.sh.in ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerUnpackerParserver.sh)
install(PROGRAMS ${TMPDIR}/bin/MQ/topologies/install/startMQSamplerUnpackerParserver.sh
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/MQ/topologies
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment