Skip to content

Commit

Permalink
Update libraries (#256)
Browse files Browse the repository at this point in the history
* updated conan package for QtColorWidgets

* "updated conan packages and some code to boot; updates #255"

* "should build, daqlite added to everything target; updates #255"

* "updated CLI11; updates #255"

* "changed node to ubuntu20.04; updates #255"

* "std filsystem linking for older compilers; updates #255"

* "consistent target link signatures in cmake; updates #255"

* trying to ignore warnings while building (hack)

* morten trying to hack his way into compiling on Mac

* debugging build

* undo debug

* trying isysroot

* trying isysroot II

* "updated conan packages and some code to boot; updates #255"

* "should build, daqlite added to everything target; updates #255"

* "updated CLI11; updates #255"

* "changed node to ubuntu20.04; updates #255"

* "std filsystem linking for older compilers; updates #255"

* "consistent target link signatures in cmake; updates #255"

* trying to ignore warnings while building (hack)

* morten trying to hack his way into compiling on Mac

* debugging build

* undo debug

* trying isysroot

* trying isysroot II

* "updated thread includes; updates #255"

* "updated conan dependencies, Jenkins badge in readme; updates #255"

* "updated dependencies; updates #255"

* "updated conan dependencies; updates #255"

* "downgrade cli11; updates #255"

* "downgrade eigen; updates #255"

* "downgrade kafka; updates #255"

* "downgrade kafka; updates #255"

* "downgrade kafka; updates #255"

* resolved conflicts

* "downgrade spdlog and removed some hacks; updates #255"

* "downgrade fmt; updates #255"

* making librdkafka linking static (revert)

* adding include path as H5CC build fails because it cant find stdio.h

* Revert "adding include path as H5CC build fails because it cant find stdio.h"

This reverts commit 68ff106.

* try -I to fix mac build

* debug

* debug

* debug: trying new sdk for isysroot

* debug: checking out if /usr and /usr/include are available

* debug: check /usr/local

* debug: trying isysroot with conan command

* debug: check /usr/local - missing string quote

* debug: testing [env] section of conan

* debug: checking conan version

* debug: removed all hacks, clean slate

* removing isysroot

* remove duplicate -> arrow in conanfile

Co-authored-by: Morten Jagd Christensen <[email protected]>
  • Loading branch information
martukas and mortenjc authored Mar 28, 2022
1 parent c1417e3 commit 8902fb4
Show file tree
Hide file tree
Showing 20 changed files with 73 additions and 53 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ if(GTest_FOUND)
all_tests
acquire
daquiri
daqlite
)
create_coverage_targets(
coverage
Expand Down
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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')
}
Expand Down Expand Up @@ -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

Expand Down
9 changes: 1 addition & 8 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions cmake/CompilerConfig.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
41 changes: 22 additions & 19 deletions conanfile.txt
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions source/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
target_link_libraries(${this_target}
PRIVATE $<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11.0>>:c++fs>)

4 changes: 2 additions & 2 deletions source/cmd/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <core/util/json_file.h>

#include <signal.h>
#include <csignal>

#ifdef BUILD_TIME
#include "build_time.h"
Expand Down Expand Up @@ -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<uint64_t>::max()));
app.add_option("-i,--input", profile_file, "DAQ producer config profile")
->check(CLI::ExistingFile);
Expand Down
1 change: 1 addition & 0 deletions source/consumers/TOF1DCorrelate.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <consumers/Spectrum.h>
#include <deque>

namespace DAQuiri {

Expand Down
1 change: 1 addition & 0 deletions source/consumers/TOFVal2DCorrelate.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <consumers/Spectrum.h>
#include <consumers/add_ons/ValueLatch.h>
#include <deque>

namespace DAQuiri
{
Expand Down
1 change: 0 additions & 1 deletion source/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions source/core/Project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <core/util/h5json.h>
#include <core/util/ascii_tree.h>

#include <fstream>

#ifdef BUILD_TIME
#include "build_time.h"
#endif
Expand Down
2 changes: 2 additions & 0 deletions source/core/thread_wrappers.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pragma once

#include <mutex>
#include <shared_mutex>
#include <condition_variable>
#include <thread>

#define MUTEX_LOCK_TIMEOUT std::chrono::microseconds(1)
Expand Down
3 changes: 1 addition & 2 deletions source/core/util/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <spdlog/sinks/stdout_color_sinks.h>

#include <fstream>
#include <date/date.h>

namespace spdlog
{
Expand All @@ -15,7 +14,7 @@ template<typename Mutex>
class ostream_sink final : public spdlog::sinks::base_sink<Mutex>
{
public:
ostream_sink(std::ostream* gui_stream)
explicit ostream_sink(std::ostream* gui_stream)
: outStream(gui_stream)
{}

Expand Down
1 change: 1 addition & 0 deletions source/core/util/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <cstdint>
#include <libgen.h>

#include <cassert> /// Somehow spdlog fails to bring it along on its own
#include <spdlog/spdlog.h>

#pragma GCC system_header
Expand Down
11 changes: 8 additions & 3 deletions source/daqlite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
target_link_libraries(${this_target}
PRIVATE $<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11.0>>:c++fs>)
1 change: 1 addition & 0 deletions source/daqlite/WorkerThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <ESSConsumer.h>
#include <QMutex>
#include <QThread>
#include <QMutex>
#include <iostream>

class WorkerThread : public QThread {
Expand Down
22 changes: 14 additions & 8 deletions source/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
target_link_libraries(${this_target}
PRIVATE $<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11.0>>:c++fs>)
6 changes: 3 additions & 3 deletions source/gui/daq/ProjectForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down

0 comments on commit 8902fb4

Please sign in to comment.