From cf9ec3de0df50b6e5cce485b4dadf2b9d3224865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Wed, 17 Jun 2020 10:34:42 +0200 Subject: [PATCH 1/2] moench zmq (#107) --- CMakeLists.txt | 6 +++ .../moenchExecutables/CMakeLists.txt | 39 +++++++++++++++++++ slsSupportLib/CMakeLists.txt | 6 +-- 3 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 slsDetectorCalibration/moenchExecutables/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 09a649b92..4612e1287 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,7 @@ option(SLS_BUILD_DOCS "docs" OFF) option(SLS_BUILD_EXAMPLES "examples" OFF) 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) # set(ClangFormat_BIN_NAME clang-format) set(ClangFormat_EXCLUDE_PATTERNS "build/" @@ -229,6 +230,11 @@ if(SLS_BUILD_DOCS) add_subdirectory(docs) endif(SLS_BUILD_DOCS) + +if(SLS_USE_MOENCH) + add_subdirectory(slsDetectorCalibration/moenchExecutables) +endif(SLS_USE_MOENCH) + if(SLS_MASTER_PROJECT) # Set install dir CMake packages set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}") diff --git a/slsDetectorCalibration/moenchExecutables/CMakeLists.txt b/slsDetectorCalibration/moenchExecutables/CMakeLists.txt new file mode 100644 index 000000000..c9f81a3f5 --- /dev/null +++ b/slsDetectorCalibration/moenchExecutables/CMakeLists.txt @@ -0,0 +1,39 @@ + + +#Moench ZMQ +add_executable(moenchZmqProcess moenchZmqProcess.cpp ../tiffIO.cpp) +add_compile_definitions(moenchZmqProcess NEWZMQ INTERP) + +#Moench04 ZMQ +add_executable(moench04ZmqProcess moenchZmqProcess.cpp ../tiffIO.cpp) +add_compile_definitions(moenchZmqProcess NEWZMQ INTERP MOENCH04) + + +#Both executables should have the same includes and output dirs +set(MOENCH_EXECUTABLES "moenchZmqProcess" "moench04ZmqProcess") + +foreach(exe ${MOENCH_EXECUTABLES}) + #TODO! At a later stage clean up include dirs and have a proper lib + target_include_directories(${exe} PRIVATE + ../ + ../dataStructures + ../interpolations + ../../slsReceiverSoftware/include/ + ) + + target_link_libraries(${exe} + PUBLIC + slsSupportLib + ${ZeroMQ_LIBRARIES} + pthread + tiff + + PRIVATE + slsProjectWarnings + ) + + + set_target_properties(${exe} PROPERTIES + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + ) +endforeach(exe ${MOENCH_EXECUTABLES}) diff --git a/slsSupportLib/CMakeLists.txt b/slsSupportLib/CMakeLists.txt index 89cf6b97c..af8ac7383 100755 --- a/slsSupportLib/CMakeLists.txt +++ b/slsSupportLib/CMakeLists.txt @@ -75,11 +75,9 @@ target_link_libraries(slsSupportLib slsProjectOptions # ${ZeroMQ_LIBRARIES} zmq - PRIVATE - - slsProjectWarnings - PUBLIC rapidjson + PRIVATE + slsProjectWarnings ) From 55af974c4ed49fbabc5b34b18aca242f07a06dec Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 17 Jun 2020 15:33:41 +0200 Subject: [PATCH 2/2] moench zmq processor option included to compile --- cmk.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/cmk.sh b/cmk.sh index 98e11a684..945c3a5d6 100755 --- a/cmk.sh +++ b/cmk.sh @@ -12,6 +12,7 @@ TESTS=0 SIMULATOR=0 CTBGUI=0 MANUALS=0 +MOENCHZMQ=0 CLEAN=0 @@ -20,7 +21,7 @@ CMAKE_PRE="" CMAKE_POST="" usage() { echo -e " -Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [-h] [-d ] [-j] +Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [-h] [z] [-d ] [-j] -[no option]: only make -c: Clean -b: Builds/Rebuilds CMake files normal mode @@ -36,6 +37,7 @@ Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [-h] [-d