Commit 7aed012e authored by Jens Kroeger's avatar Jens Kroeger
Browse files

Merge branch 'fix_52' into 'master'

EventLoaderEUDAQ2: Renovate linking to EUDAQ2,

Closes #52

See merge request !176
parents 3f5a73b3 f482bfb1
Pipeline #1173006 passed with stages
in 15 minutes and 59 seconds
# - Try to find the EUDAQ2 framework
# Once done this will define
# EUDAQ2_FOUND - System has EUDAQ2
# EUDAQ2_INCLUDE_DIR - The EUDAQ2 main include directories
# EUDAQ2_LIBRARY - The libraries needed to use EUDAQ2
MESSAGE(STATUS "Looking for EUDAQ2...")
FIND_PATH(EUDAQ2_INCLUDE_DIR NAMES "eudaq/FileReader.hh" PATHS "$ENV{EUDAQ2PATH}/include")
MESSAGE(STATUS "FileReader.hh => ${EUDAQ2_INCLUDE_DIR}")
IF(EUDAQ2_INCLUDE_DIR)
SET(EUDAQ2_INC_FOUND TRUE)
MESSAGE(STATUS "Found EUDAQ2 headers: ${EUDAQ2_INCLUDE_DIR}")
ENDIF()
FIND_LIBRARY(EUDAQ2_LIBRARY NAMES "libeudaq_core.so" HINTS "$ENV{EUDAQ2PATH}/lib")
MESSAGE(STATUS "libeudaq_core.so => ${EUDAQ2_LIBRARY}")
IF(EUDAQ2_LIBRARY)
SET(EUDAQ2_LIB_FOUND TRUE)
MESSAGE(STATUS "Found EUDAQ2 library: ${EUDAQ2_LIBRARY} ")
GET_FILENAME_COMPONENT(EUDAQ2_LIB_PATH ${EUDAQ2_LIBRARY} DIRECTORY)
MESSAGE(STATUS "EUDAQ2_LIB_PATH = ${EUDAQ2_LIB_PATH}")
FILE(GLOB EUDAQ2_LIBRARY "${EUDAQ2_LIB_PATH}/*.so")
MESSAGE(STATUS "EUDAQ2_LIBRARY list = ${EUDAQ2_LIBRARY}")
ENDIF()
IF(EUDAQ2_LIB_FOUND AND EUDAQ2_INC_FOUND)
SET(EUDAQ2_FOUND TRUE)
ENDIF()
#mark_as_advanced(EUDAQ2_LIBRARY EUDAQ2_INCLUDE_DIR)
mark_as_advanced(EUDAQ2_LIBRARY EUDAQ2_INCLUDE_DIR)
......@@ -18,7 +18,8 @@ RUN yum -y install \
libXft-devel libXext-devel \
python \
redhat-lsb-core \
git
git \
readline-devel
ENTRYPOINT ["scl", "enable", "devtoolset-7"]
CMD ["bash"]
......@@ -33,23 +33,18 @@ RUN source scl_source enable devtoolset-7 && \
rm -rf ${ROOTSYS}/{src,build}
ENV PEARY_VERSION v0.9.7
ENV PEARY_VERSION v0.9.11
# Add layer for Caribou Peary
ENV PEARYPATH="/opt/peary"
RUN source scl_source enable devtoolset-7 && \
yum install -y readline-devel && \
mkdir -p ${PEARYPATH}/{src,build} && \
curl -L -o ${PEARYPATH}/peary-${PEARY_VERSION}.zip \
https://gitlab.cern.ch/Caribou/peary/-/archive/${PEARY_VERSION}/peary-${PEARY_VERSION}.zip && \
unzip ${PEARYPATH}/peary-${PEARY_VERSION}.zip -d ${PEARYPATH}/src && \
rm -f ${PEARYPATH}/peary-${PEARY_VERSION}.zip && \
cd ${PEARYPATH}/build && \
cmake3 -DINTERFACE_I2C=OFF \
-DINTERFACE_SPI=OFF \
-DINTERFACE_SPI_CLICpix2=OFF \
-DINTERFACE_MEM=OFF \
-DINSTALL_HEADERS=ON \
cmake3 -DINTERFACE_EMULATION=ON \
-DINSTALL_PREFIX=../ \
../src/peary-${PEARY_VERSION} && \
make -j`grep -c processor /proc/cpuinfo` && \
......@@ -57,7 +52,7 @@ RUN source scl_source enable devtoolset-7 && \
rm -rf ${PEARYPATH}/{src,build}
ENV EUDAQ2_VERSION 2.3.0
ENV EUDAQ2_VERSION 2.4.1
# Add layer for EUDAQ2
ENV EUDAQ2PATH="/opt/eudaq2"
......@@ -71,11 +66,10 @@ RUN source scl_source enable devtoolset-7 && \
cmake3 -DEUDAQ_BUILD_EXECUTABLE=OFF \
-DEUDAQ_BUILD_GUI=OFF \
-DUSER_CARIBOU_BUILD=ON \
-DPEARYLIBS=${PEARYPATH}/lib \
-DPEARYINCLUDE=${PEARYPATH}/include/peary \
-DUSER_EUDET_BUILD=ON \
-DUSER_TLU_BUILD=ON \
-DEUDAQ_INSTALL_PREFIX=../ \
-DCMAKE_PREFIX_PATH=${PEARYPATH}/share/cmake/Modules/ \
../src/eudaq-${EUDAQ2_VERSION} && \
make -j`grep -c processor /proc/cpuinfo` && \
make install && \
......
......@@ -3,24 +3,11 @@ CORRYVRECKAN_ENABLE_DEFAULT(OFF)
# Define module and return the generated name as MODULE_NAME
CORRYVRECKAN_DETECTOR_MODULE(MODULE_NAME)
FIND_PACKAGE(EUDAQ2 QUIET)
IF(NOT EUDAQ2_FOUND)
MESSAGE(FATAL_ERROR "Could not find EUDAQ 2, make sure to set the path to your installation using\n"
"$ export EUDAQ2PATH=/your/path/to/EUDAQ")
ENDIF()
FIND_PACKAGE(eudaq 2.4 REQUIRED)
INCLUDE_DIRECTORIES(SYSTEM ${EUDAQ2_INCLUDE_DIR})
# Add source files to library
CORRYVRECKAN_MODULE_SOURCES(${MODULE_NAME}
EventLoaderEUDAQ2.cpp
# ADD SOURCE FILES HERE...
)
# Add EUDAQ2 libraries
TARGET_LINK_LIBRARIES(${MODULE_NAME} ${EUDAQ2_LIBRARY})
INCLUDE_DIRECTORIES(SYSTEM ${EUDAQ_INCLUDE_DIRS})
CORRYVRECKAN_MODULE_SOURCES(${MODULE_NAME} EventLoaderEUDAQ2.cpp)
TARGET_LINK_LIBRARIES(${MODULE_NAME} ${EUDAQ2_LIBRARY} eudaq::core eudaq::modules)
# Provide standard install target
CORRYVRECKAN_MODULE_INSTALL(${MODULE_NAME})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment