diff --git a/CMakeLists.txt b/CMakeLists.txt index ca386774..1b50104d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,7 @@ if(GTest_FOUND) all_tests acquire daquiri + daqlite ) create_coverage_targets( coverage diff --git a/Jenkinsfile b/Jenkinsfile index 506236d7..219dbf43 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,7 +19,7 @@ properties([[ container_build_nodes = [ 'centos': ContainerBuildNode.getDefaultContainerBuildNode('centos7-gcc8'), - 'ubuntu': ContainerBuildNode.getDefaultContainerBuildNode('ubuntu1804-gcc8') + 'ubuntu2004': ContainerBuildNode.getDefaultContainerBuildNode('ubuntu2004') ] pipeline_builder = new PipelineBuilder(this, container_build_nodes) @@ -51,7 +51,7 @@ def get_macos_pipeline() { try { // Remove existing CLI11 because of case insensitive filesystem issue sh "conan remove -f 'CLI11*' && \ - cmake ../code" + CFLAGS='-Wno-error=implicit-function-declaration' cmake ../code" } catch (e) { failure_function(e, 'MacOSX / CMake failed') } @@ -106,7 +106,7 @@ builders = pipeline_builder.createBuilders { container -> container.sh """ cd ${project}/build - cmake .. ${coverage_flag} + CFLAGS=-Wno-error=implicit-function-declaration cmake .. ${coverage_flag} """ } // stage diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 784c10d2..de3e7ccd 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -11,12 +11,5 @@ The branch you merge from should already reference a daquiri github ticket numbe - [ ] utils/daquiri.sh runs - [ ] MockProducer profile runs and produces plots (manual test) - [ ] profiles in /data directory have been updated (if applicable) +- [ ] Request code review ---- - -## Nominate for Group Code Review (Anyone can nominate it) -Indicate if you think the code should be reviewed in a Thursday code review session. - -- [ ] Recommend for group code review - -Also, nominate it on the code_review Slack channel. diff --git a/README.md b/README.md index 6fdd2049..308c2391 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # DAQuiri Versatile DAQ engine for physics detectors, event mode and otherwise, with a variety of histogram types for images, spectra, time-of-flight, activity. +[![Build Status](https://jenkins.esss.dk/dm/job/ess-dmsc/job/daquiri/job/master/badge/icon)](https://jenkins.esss.dk/dm/job/ess-dmsc/job/daquiri/job/master/) [![DOI](https://zenodo.org/badge/94489375.svg)](https://zenodo.org/badge/latestdoi/94489375) ![screenshot](documentation/screenshot.png) diff --git a/cmake/CompilerConfig.cmake b/cmake/CompilerConfig.cmake index 197a9120..fb15d215 100644 --- a/cmake/CompilerConfig.cmake +++ b/cmake/CompilerConfig.cmake @@ -1,8 +1,8 @@ # C++ standard set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -if (NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 14) - set(CMAKE_CXX_STANDARD 14) +if (NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 17) + set(CMAKE_CXX_STANDARD 17) endif () if (CMAKE_CXX_COMPILER_ID MATCHES GNU) diff --git a/conanfile.txt b/conanfile.txt index 66e059b3..113c428b 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -1,33 +1,36 @@ [requires] -cli11/1.9.1 -date/27d1e1e@ess-dmsc/stable -eigen/3.3.9 -fmt/6.2.0 +cli11/2.1.1 #bump to 2.1.2 requires conan upgrade +date/3.0.1 +eigen/3.3.9 #bump to 3.4.0 requires conan upgrade gtest/1.10.0 -h5cpp/0.3.3@ess-dmsc/stable -nlohmann_json/3.9.1 -librdkafka/1.6.0 +fmt/6.2.0 #bump to 8.1.1 requires upgrade of spdlog as well +librdkafka/1.6.0 #bump to 1.8.2 requires conan upgrade +nlohmann_json/3.10.5 +spdlog/1.8.5 #bump to 1.9.2 requires conan upgrade +h5cpp/0.4.1@ess-dmsc/stable logical-geometry/705ea61@ess-dmsc/stable -qplot/2ffc74f@ess-dmsc/stable -Qt-Color-Widgets/a95f72e@ess-dmsc/stable -spdlog/1.8.5 +qplot/6e192ab@ess-dmsc/stable +Qt-Color-Widgets/9f4e052@ess-dmsc/stable streaming-data-types/6a41aee@ess-dmsc/stable [generators] cmake -virtualrunenv cmake_find_package +virtualbuildenv +virtualrunenv [options] gtest:shared=False librdkafka:shared=False +flatbuffers:shared=True +hdf5:shared=True +date:use_system_tz_db=True +h5cpp:with_boost=False [imports] -bin, cmake -> ./bin -bin, *.dll -> ./bin -lib, *.dll -> ./bin -lib, *.so.* -> ./lib -lib, *.so -> ./lib -share, * -> ./share -filesystem/lib, *.so* -> ./lib -system/lib, *.so* -> ./lib +., *.dylib* -> ./lib @ keep_path=False +., *.so* -> ./lib @ keep_path=False +., LICENSE* -> ./licenses @ folder=True, ignore_case=True +., *.dll -> ./bin @ keep_path=False +., *.a* -> ./lib @ keep_path=False +., *.lib -> ./bin @ keep_path=False diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index d81849a5..3b588894 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -4,9 +4,8 @@ include(BuildInfo) find_package(date REQUIRED) find_package(spdlog REQUIRED) find_package(fmt REQUIRED) -find_package(h5cpp 0.1.0 REQUIRED) +find_package(h5cpp 0.4.0 REQUIRED) find_package(Threads REQUIRED) -add_definitions("-DGRAYLOG") add_subdirectory(core) add_subdirectory(consumers) diff --git a/source/cmd/CMakeLists.txt b/source/cmd/CMakeLists.txt index c5484780..c50e02de 100644 --- a/source/cmd/CMakeLists.txt +++ b/source/cmd/CMakeLists.txt @@ -12,3 +12,9 @@ target_link_libraries( PRIVATE ${PROJECT_NAME}_consumers ) +# Link stdc++fs or c++experimental to get std::experimental::filesystem when necessary +target_link_libraries(${this_target} + PRIVATE $<$,$,9.0>>:stdc++fs>) +target_link_libraries(${this_target} + PRIVATE $<$,$,11.0>>:c++fs>) + diff --git a/source/cmd/main.cpp b/source/cmd/main.cpp index b8328970..64b153d3 100644 --- a/source/cmd/main.cpp +++ b/source/cmd/main.cpp @@ -16,7 +16,7 @@ #include -#include +#include #ifdef BUILD_TIME #include "build_time.h" @@ -44,7 +44,7 @@ struct AcquireOptions AcquireOptions() { - app.add_option("-t,--time", duration, "How long shall we run?", true) + app.add_option("-t,--time", duration, "How long shall we run?") ->check(CLI::Range(uint64_t(1), std::numeric_limits::max())); app.add_option("-i,--input", profile_file, "DAQ producer config profile") ->check(CLI::ExistingFile); diff --git a/source/consumers/TOF1DCorrelate.h b/source/consumers/TOF1DCorrelate.h index 1c094a7d..4da461e3 100644 --- a/source/consumers/TOF1DCorrelate.h +++ b/source/consumers/TOF1DCorrelate.h @@ -1,6 +1,7 @@ #pragma once #include +#include namespace DAQuiri { diff --git a/source/consumers/TOFVal2DCorrelate.h b/source/consumers/TOFVal2DCorrelate.h index fcd03895..152db0cd 100644 --- a/source/consumers/TOFVal2DCorrelate.h +++ b/source/consumers/TOFVal2DCorrelate.h @@ -2,6 +2,7 @@ #include #include +#include namespace DAQuiri { diff --git a/source/core/CMakeLists.txt b/source/core/CMakeLists.txt index 5fff1ebc..a9f979b0 100644 --- a/source/core/CMakeLists.txt +++ b/source/core/CMakeLists.txt @@ -58,7 +58,6 @@ target_include_directories( target_link_libraries( ${this_target} PUBLIC ${COVERAGE_LIBRARIES} - PUBLIC ${GraylogLogger_STATIC_LIBRARIES} PUBLIC h5cpp::h5cpp PUBLIC fmt::fmt PUBLIC spdlog::spdlog diff --git a/source/core/Project.cpp b/source/core/Project.cpp index d1d139a4..3b5a9ff3 100644 --- a/source/core/Project.cpp +++ b/source/core/Project.cpp @@ -4,6 +4,8 @@ #include #include +#include + #ifdef BUILD_TIME #include "build_time.h" #endif diff --git a/source/core/thread_wrappers.h b/source/core/thread_wrappers.h index bd3bd7e4..36aaa732 100644 --- a/source/core/thread_wrappers.h +++ b/source/core/thread_wrappers.h @@ -1,6 +1,8 @@ #pragma once +#include #include +#include #include #define MUTEX_LOCK_TIMEOUT std::chrono::microseconds(1) diff --git a/source/core/util/logger.cpp b/source/core/util/logger.cpp index 2c31b822..c90808b0 100644 --- a/source/core/util/logger.cpp +++ b/source/core/util/logger.cpp @@ -4,7 +4,6 @@ #include #include -#include namespace spdlog { @@ -15,7 +14,7 @@ template class ostream_sink final : public spdlog::sinks::base_sink { public: - ostream_sink(std::ostream* gui_stream) + explicit ostream_sink(std::ostream* gui_stream) : outStream(gui_stream) {} diff --git a/source/core/util/logger.h b/source/core/util/logger.h index 70086445..9599ba60 100644 --- a/source/core/util/logger.h +++ b/source/core/util/logger.h @@ -15,6 +15,7 @@ #include #include +#include /// Somehow spdlog fails to bring it along on its own #include #pragma GCC system_header diff --git a/source/daqlite/CMakeLists.txt b/source/daqlite/CMakeLists.txt index c7110434..d85d63f3 100644 --- a/source/daqlite/CMakeLists.txt +++ b/source/daqlite/CMakeLists.txt @@ -41,7 +41,12 @@ target_link_libraries( PUBLIC fmt::fmt PRIVATE RdKafka::rdkafka++ PRIVATE RdKafka::rdkafka - QPlot - QtColorWidgets-Qt52 - Qt5::Widgets + PRIVATE QPlot + PRIVATE QtColorWidgets + PRIVATE Qt5::Widgets ) + +target_link_libraries(${this_target} + PRIVATE $<$,$,9.0>>:stdc++fs>) +target_link_libraries(${this_target} + PRIVATE $<$,$,11.0>>:c++fs>) diff --git a/source/daqlite/WorkerThread.h b/source/daqlite/WorkerThread.h index 990e2993..a547fe38 100644 --- a/source/daqlite/WorkerThread.h +++ b/source/daqlite/WorkerThread.h @@ -15,6 +15,7 @@ #include #include #include +#include #include class WorkerThread : public QThread { diff --git a/source/gui/CMakeLists.txt b/source/gui/CMakeLists.txt index 6aa7cb25..ffea4a7e 100644 --- a/source/gui/CMakeLists.txt +++ b/source/gui/CMakeLists.txt @@ -56,12 +56,18 @@ target_include_directories( target_link_libraries( ${this_target} - ${PROJECT_NAME}_core - ${PROJECT_NAME}_producers - ${PROJECT_NAME}_consumers - QPlot - QtColorWidgets-Qt52 - Qt5::Widgets - Qt5::PrintSupport - Qt5::Network + PRIVATE ${PROJECT_NAME}_core + PRIVATE ${PROJECT_NAME}_producers + PRIVATE ${PROJECT_NAME}_consumers + PRIVATE QPlot + PRIVATE QtColorWidgets + PRIVATE Qt5::Widgets + PRIVATE Qt5::PrintSupport + PRIVATE Qt5::Network ) + +# Link stdc++fs or c++experimental to get std::experimental::filesystem when necessary +target_link_libraries(${this_target} + PRIVATE $<$,$,9.0>>:stdc++fs>) +target_link_libraries(${this_target} + PRIVATE $<$,$,11.0>>:c++fs>) diff --git a/source/gui/daq/ProjectForm.cpp b/source/gui/daq/ProjectForm.cpp index 7f3d9886..5544ee40 100644 --- a/source/gui/daq/ProjectForm.cpp +++ b/source/gui/daq/ProjectForm.cpp @@ -348,10 +348,10 @@ void ProjectForm::save() if (project_identity_.isEmpty() || !project_->changed()) return; - boost::filesystem::path path(project_identity_.toStdString()); - if (!boost::filesystem::exists(path) || !hdf5::file::is_hdf5_file(path)) + std::filesystem::path path(project_identity_.toStdString()); + if (!std::filesystem::exists(path) || !hdf5::file::is_hdf5_file(path)) { - path = boost::filesystem::path(data_directory_.toStdString()) + path = std::filesystem::path(data_directory_.toStdString()) / (project_identity_.toStdString() + ".daq"); }