Compare commits

...

1 Commits

Author SHA1 Message Date
e229cd0ba7 removed Makefile for moench and integrated the build in CMake 2022-01-24 16:09:18 +01:00
4 changed files with 53 additions and 77 deletions

View File

@ -56,6 +56,18 @@ option(SLS_TUNE_LOCAL "tune to local machine" OFF)
option(SLS_DEVEL_HEADERS "install headers for devel" OFF)
option(SLS_USE_MOENCH "compile zmq and post processing for Moench" OFF)
#Convenience option to switch off defaults when building Moench binaries only
option(SLS_BUILD_ONLY_MOENCH "compile only Moench" OFF)
if(SLS_BUILD_ONLY_MOENCH)
message(STATUS "Build MOENCH binaries only!")
set(SLS_BUILD_SHARED_LIBRARIES OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
set(SLS_USE_TEXTCLIENT OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
set(SLS_USE_DETECTOR OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
set(SLS_USE_RECEIVER OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
set(SLS_USE_RECEIVER_BINARIES OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
set(SLS_USE_MOENCH ON CACHE BOOL "Enable" FORCE)
endif()
set(ClangFormat_EXCLUDE_PATTERNS "build/"
"libs/"

View File

@ -3,17 +3,56 @@
find_package(TIFF REQUIRED)
set(MOENCH_EXECUTABLES)
#Moench ZMQ
add_executable(moenchZmqProcess moenchZmqProcess.cpp ../tiffIO.cpp)
target_compile_definitions(moenchZmqProcess PRIVATE NEWZMQ INTERP)
list(APPEND MOENCH_EXECUTABLES moenchZmqProcess)
#Moench04 ZMQ
add_executable(moench04ZmqProcess moenchZmqProcess.cpp ../tiffIO.cpp)
target_compile_definitions(moench04ZmqProcess PRIVATE NEWZMQ INTERP MOENCH04)
list(APPEND MOENCH_EXECUTABLES moench04ZmqProcess)
#Both executables should have the same includes and output dirs
set(MOENCH_EXECUTABLES "moenchZmqProcess" "moench04ZmqProcess")
#OFFLINE Processing?
add_executable(moenchClusterFinder moench03ClusterFinder.cpp ../tiffIO.cpp)
target_compile_definitions(moenchClusterFinder PRIVATE SAVE_ALL NEWRECEIVER)
list(APPEND MOENCH_EXECUTABLES moenchClusterFinder)
add_executable(moenchClusterFinderHighZ moench03ClusterFinder.cpp ../tiffIO.cpp)
target_compile_definitions(moenchClusterFinderHighZ PRIVATE SAVE_ALL NEWRECEIVER HIGHZ)
list(APPEND MOENCH_EXECUTABLES moenchClusterFinderHighZ)
add_executable(moenchMakeEta moench03Interpolation.cpp ../tiffIO.cpp)
target_compile_definitions(moenchMakeEta PRIVATE FF)
list(APPEND MOENCH_EXECUTABLES moenchMakeEta)
add_executable(moenchInterpolation moench03Interpolation.cpp ../tiffIO.cpp)
#no compile defs
list(APPEND MOENCH_EXECUTABLES moenchInterpolation)
add_executable(moenchNoInterpolation moench03NoInterpolation.cpp ../tiffIO.cpp)
#no compile defs
list(APPEND MOENCH_EXECUTABLES moenchNoInterpolation)
add_executable(moenchPhotonCounter moenchPhotonCounter.cpp ../tiffIO.cpp)
target_compile_definitions(moenchPhotonCounter PRIVATE NEWRECEIVER)
list(APPEND MOENCH_EXECUTABLES moenchPhotonCounter)
add_executable(moenchAnalog moenchPhotonCounter.cpp ../tiffIO.cpp)
target_compile_definitions(moenchAnalog PRIVATE NEWRECEIVER ANALOG)
list(APPEND MOENCH_EXECUTABLES moenchAnalog)
add_executable(moenchPhotonCounterHighZ moenchPhotonCounter.cpp ../tiffIO.cpp)
target_compile_definitions(moenchPhotonCounterHighZ PRIVATE NEWRECEIVER HIGHZ)
list(APPEND MOENCH_EXECUTABLES moenchPhotonCounterHighZ)
add_executable(moenchAnalogHighZ moenchPhotonCounter.cpp ../tiffIO.cpp)
target_compile_definitions(moenchAnalogHighZ PRIVATE NEWRECEIVER ANALOG HIGHZ)
list(APPEND MOENCH_EXECUTABLES moenchAnalogHighZ)
foreach(exe ${MOENCH_EXECUTABLES})
#TODO! At a later stage clean up include dirs and have a proper lib

View File

@ -1,49 +0,0 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
#module add CBFlib/0.9.5
INCDIR=-I. -I../ -I../interpolations -I../interpolations/etaVEL -I../dataStructures -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/
LDFLAG= ../tiffIO.cpp -L/usr/lib64/ -lpthread -lm -lstdc++ -pthread -lrt -ltiff -O3 -std=c++11
MAIN=moench03ClusterFinder.cpp
all: moenchClusterFinder moenchMakeEta moenchInterpolation moenchNoInterpolation moenchPhotonCounter moenchAnalog
moenchClusterFinder: moench03ClusterFinder.cpp $(INCS) clean
g++ -o moenchClusterFinder moench03ClusterFinder.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DNEWRECEIVER
moenchClusterFinderHighZ: moench03ClusterFinder.cpp $(INCS) clean
g++ -o moenchClusterFinderHighZ moench03ClusterFinder.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DNEWRECEIVER -DHIGHZ
moenchMakeEta: moench03Interpolation.cpp $(INCS) clean
g++ -o moenchMakeEta moench03Interpolation.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DFF
moenchInterpolation: moench03Interpolation.cpp $(INCS) clean
g++ -o moenchInterpolation moench03Interpolation.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF)
moenchNoInterpolation: moench03NoInterpolation.cpp $(INCS) clean
g++ -o moenchNoInterpolation moench03NoInterpolation.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF)
moenchPhotonCounter: moenchPhotonCounter.cpp $(INCS) clean
g++ -o moenchPhotonCounter moenchPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER
moenchAnalog: moenchPhotonCounter.cpp $(INCS) clean
g++ -o moenchAnalog moenchPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DANALOG
moenchPhotonCounterHighZ: moenchPhotonCounter.cpp $(INCS) clean
g++ -o moenchPhotonCounterHighZ moenchPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DHIGHZ
moenchAnalogHighZ: moenchPhotonCounter.cpp $(INCS) clean
g++ -o moenchAnalogHighZ moenchPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DANALOG -DHIGHZ
clean:
rm -f moenchClusterFinder moenchMakeEta moenchInterpolation moenchNoInterpolation moenchPhotonCounter moenchAnalog

View File

@ -1,26 +0,0 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
INCDIR= -I. -I../dataStructures ../tiffIO.cpp -I../ -I../interpolations/ -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../../libs/rapidjson/
LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -O3 -std=c++11 -Wall -L../../build/bin/ -lSlsSupport
#-L../../bin -lhdf5 -L.
#DESTDIR?=../bin
all: moenchZmqProcess
#moenchZmq04Process
#moenchZmqProcessCtbGui
moenchZmqProcess: moenchZmqProcess.cpp clean
g++ -o moenchZmqProcess moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP
#moenchZmq04Process: moenchZmqProcess.cpp clean#
# g++ -o moench04ZmqProcess moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP -DMOENCH04
#moenchZmqProcessCtbGui: moenchZmqProcess.cpp clean
# g++ -o moenchZmqProcessCtbGui moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP -DCTBGUI
clean:
rm -f moenchZmqProcess