mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-18 08:06:43 +01:00
* moench: changed max shifts of adc clk from 240 to 200 (#909) * moench server name and version renaming * 802/moench default speed (#910) * moench:change default speed to half speed * Protect from getenv("HOME") returning nullptr (#907) * Protect from getenv("HOME") returning nullptr (e.g., in case running in systemd) * Write proper warning in Module.cpp * moench: min exptime and also a firmware update required (#911) * moench server: changed default values of adcphase for full speed from 300 to 150 and dac vipre_cds from 800 to 1280 (#921) * client bug fix: m3 multi module bad channel file throws bad allocation when modules skipped, needed to add vectors in 2d vector of bad channel list (#919) * 8.0.2.rc: client: blocking acquire stop with slave temporarily in waiting (#925) * client: stopping a blocking acquire of multi modules checks status to catch slaves that might still be in waiting. Problem is (gotthard2 25um at least) slave is in waiting only temporarily before going go idle/stopped. So a 50ms sleep is necessary ot not throw an unnecessary error * client: when stopping blocking acquire, wait up to 1s in 50ms increments for slave to stop waiting temporarily * fix to rapidjson for build with gcc 14 (#928) * 8.0.2.rc: m3 clkdiv0 20 (#923) * m3: clk 0 changed from 10 to 20 (100MHz to 50MHz) * g2: startup clk div back to 10 as in firmware but setting in software startup to 20 * 8.0.2.rc: moench empty data callback (#935) * moench: empty data call back so that zmq sockets are still made and listened to in acquire that it waits for the dummy packet to be done * moench zmq postprocessor: remove NEWZMQ ifdefs and remove connect for publisher socket * changed enum from READOUT_ACTION_ZMQ to READOUT_ZMQ_ACTION for consistency * 8.0.2.rc: client: status for blocking acquire stop with slave temporarily in waiting (#943) * acq finish call back gets status squashed with default error but before that need to wait for gotthard slaves to catch up from waiting to stopped * bug fixes related to file saving (#931) * fix the file path resetting issue of GUI in the case where different modules have different fpath setting. * fix stack-buffer-overflow issue when using HDF5 HDF5DataFile::parameterDataTypes have 64bit type (i.e. STD_U64LE), the size of fill_value should be at least 8 bytes. * change the type of fill_value to uint64_t * updated documentation from martin (#947) * 802: jungfrau HW 1.0: adc output clock phase to 120 (#951) * jungfrau: change adc output clock phase from 180 to 120 for v1.0 boards for reliable readout of adc #2 * formatting * 802/release notes (#954) * updated release notes * versioning * fixed a warning about narrowing conversion from size_t to int (#962) * updating client versioning * dont build doc for Tobi Schluter from libzmq, which uses iso-8859-1 and the umlaut cause compilation to fail on some machines (#972) * updated release notes --------- Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com> Co-authored-by: Z.H. Li <zhenghenge@gmail.com>
124 lines
3.5 KiB
CMake
Executable File
124 lines
3.5 KiB
CMake
Executable File
# SPDX-License-Identifier: LGPL-3.0-or-other
|
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
set(SOURCES
|
|
src/DetectorImpl.cpp
|
|
src/Module.cpp
|
|
src/Detector.cpp
|
|
src/CmdProxy.cpp
|
|
src/CmdParser.cpp
|
|
src/Pattern.cpp
|
|
src/CtbConfig.cpp
|
|
)
|
|
|
|
add_library(slsDetectorObject OBJECT
|
|
${SOURCES}
|
|
)
|
|
|
|
target_include_directories(slsDetectorObject PUBLIC
|
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
|
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
|
PRIVATE
|
|
${SLS_INTERNAL_RAPIDJSON_DIR}
|
|
)
|
|
|
|
target_link_libraries(slsDetectorObject
|
|
PUBLIC
|
|
slsProjectOptions
|
|
slsSupportStatic
|
|
pthread
|
|
rt
|
|
PRIVATE
|
|
slsProjectWarnings
|
|
)
|
|
|
|
set(DETECTOR_LIBRARY_TARGETS slsDetectorObject)
|
|
|
|
|
|
set(PUBLICHEADERS
|
|
include/sls/detectorData.h
|
|
include/sls/Detector.h
|
|
include/sls/Result.h
|
|
include/sls/Pattern.h
|
|
)
|
|
|
|
#Shared library
|
|
if(SLS_BUILD_SHARED_LIBRARIES)
|
|
add_library(slsDetectorShared SHARED $<TARGET_OBJECTS:slsDetectorObject>)
|
|
target_link_libraries(slsDetectorShared PUBLIC slsDetectorObject)
|
|
set_target_properties(slsDetectorShared PROPERTIES
|
|
VERSION ${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}
|
|
SOVERSION ${PACKAGE_VERSION_MAJOR}
|
|
LIBRARY_OUTPUT_NAME SlsDetector
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
|
PUBLIC_HEADER "${PUBLICHEADERS}"
|
|
)
|
|
list(APPEND DETECTOR_LIBRARY_TARGETS slsDetectorShared)
|
|
endif(SLS_BUILD_SHARED_LIBRARIES)
|
|
|
|
#Static library
|
|
add_library(slsDetectorStatic STATIC $<TARGET_OBJECTS:slsDetectorObject>)
|
|
target_link_libraries(slsDetectorStatic PUBLIC slsDetectorObject)
|
|
|
|
set_target_properties(slsDetectorStatic PROPERTIES
|
|
ARCHIVE_OUTPUT_NAME SlsDetectorStatic
|
|
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
|
PUBLIC_HEADER "${PUBLICHEADERS}"
|
|
)
|
|
list(APPEND DETECTOR_LIBRARY_TARGETS slsDetectorStatic)
|
|
|
|
|
|
|
|
|
|
|
|
if((CMAKE_BUILD_TYPE STREQUAL "Release") AND SLS_LTO_AVAILABLE)
|
|
set_property(TARGET ${DETECTOR_LIBRARY_TARGETS} PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
|
|
endif()
|
|
|
|
|
|
if(SLS_USE_TEXTCLIENT)
|
|
# Loop over list to generate command line binaries
|
|
set(bin_names "sls_detector_put"
|
|
"sls_detector_get"
|
|
"sls_detector_acquire"
|
|
"sls_detector_acquire_zmq"
|
|
"sls_detector_help")
|
|
set(cmd_name "PUT" "GET" "READOUT" "READOUTZMQ" "HELP")
|
|
list(LENGTH bin_names len1)
|
|
math(EXPR len2 "${len1} - 1")
|
|
|
|
foreach(val RANGE ${len2})
|
|
list(GET bin_names ${val} val1)
|
|
list(GET cmd_name ${val} val2)
|
|
message(STATUS "${val1} ${val2}")
|
|
|
|
add_executable(${val1} src/CmdLineApp.cpp)
|
|
target_link_libraries(${val1}
|
|
slsDetectorStatic
|
|
pthread
|
|
rt
|
|
)
|
|
set_target_properties(${val1} PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
|
COMPILE_DEFINITIONS ${val2}=1
|
|
)
|
|
if((CMAKE_BUILD_TYPE STREQUAL "Release") AND SLS_LTO_AVAILABLE)
|
|
set_property(TARGET ${val1} PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
|
|
endif()
|
|
endforeach()
|
|
install(TARGETS ${bin_names} DESTINATION bin)
|
|
|
|
endif(SLS_USE_TEXTCLIENT)
|
|
|
|
if (SLS_USE_TESTS)
|
|
add_subdirectory(tests)
|
|
endif(SLS_USE_TESTS)
|
|
|
|
|
|
install(TARGETS ${DETECTOR_LIBRARY_TARGETS}
|
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sls
|
|
)
|