From 95ec9678fd9e5a9fb23ed1c9f5bdce5b33787b0a Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Thu, 8 Apr 2021 11:53:05 +0200 Subject: [PATCH] Add conditional build of jf-live-writer jf-live-writer requires PHDF5, which is not very popular on development machines. If you want to enable this, you have to pass BUILD_JF_LIVE_WRITER=ON to cmake. See the README. --- CMakeLists.txt | 5 ++++- jf-live-writer/Dockerfile | 2 +- jf-live-writer/README.md | 11 +++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 659699f..dc317ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,5 +34,8 @@ add_subdirectory("jf-buffer-writer") add_subdirectory("jf-assembler") add_subdirectory("sf-stream") add_subdirectory("sf-writer") -#add_subdirectory("jf-live-writer") + +if(BUILD_JF_LIVE_WRITER) + add_subdirectory("jf-live-writer") +endif() diff --git a/jf-live-writer/Dockerfile b/jf-live-writer/Dockerfile index 9e30160..d305ff1 100644 --- a/jf-live-writer/Dockerfile +++ b/jf-live-writer/Dockerfile @@ -23,4 +23,4 @@ WORKDIR / RUN git clone --depth 1 --branch ${branch} https://github.com/paulscherrerinstitute/sf_daq_buffer.git RUN mkdir /sf_daq_buffer/build WORKDIR /sf_daq_buffer/build -RUN cmake3 .. && make jf-live-writer +RUN cmake3 -DBUILD_JF_LIVE_WRITER=ON .. && make jf-live-writer diff --git a/jf-live-writer/README.md b/jf-live-writer/README.md index ce4349c..3a92a90 100644 --- a/jf-live-writer/README.md +++ b/jf-live-writer/README.md @@ -1,5 +1,16 @@ # jf-live-writer +The jf-live-writer is packaged as a Docker container for development and +testing. + +## Building +In order to build this executable you need to specify the cmake variable +``` +cmake3 -DBUILD_JF_LIVE_WRITER=ON +``` +The project will not build if you do not have installed the PHDF5 library. +Please follow instructions below on how to do that manually. + ## Install PHDF5 manually ``` wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.tar.gz