From 11ba8798978d4f3a21cf906067303f6e6eceb2da Mon Sep 17 00:00:00 2001 From: John Freeman Date: Tue, 29 Aug 2023 11:48:52 -0500 Subject: [PATCH 1/2] JCF: take advantage of the change to daq_oks_codegen described in DUNE-DAQ/daq-cmake#90 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f00ed86..d22535d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ find_package(oksdbinterfaces REQUIRED) daq_oks_codegen(core.schema.xml) -daq_add_library(algorithms.cpp disabled-components.cpp test_circular_dependency.cpp LINK_LIBRARIES oksdbinterfaces::oksdbinterfaces okssystem::okssystem logging::logging dal_oks) +daq_add_library(algorithms.cpp disabled-components.cpp test_circular_dependency.cpp LINK_LIBRARIES oksdbinterfaces::oksdbinterfaces okssystem::okssystem logging::logging) daq_add_python_bindings(*.cpp LINK_LIBRARIES dal) From f970cc7aeb2a6c6852da6193fa00b0de81d3f733 Mon Sep 17 00:00:00 2001 From: John Freeman Date: Tue, 29 Aug 2023 12:34:54 -0500 Subject: [PATCH 2/2] JCF: update the documentation to reflect the changes from DUNE-DAQ/daq-cmake#90 --- docs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index 2686a39..22e7922 100644 --- a/docs/README.md +++ b/docs/README.md @@ -113,9 +113,9 @@ The `tutorial.schema.xml` file and `tutorial.data.xml` files are fairly easy to ``` daq_oks_codegen(core.schema.xml) -daq_add_library(algorithms.cpp disabled-components.cpp test_circular_dependency.cpp LINK_LIBRARIES oksdbinterfaces::oksdbinterfaces okssystem::okssystem logging::logging dal_oks) +daq_add_library(algorithms.cpp disabled-components.cpp test_circular_dependency.cpp LINK_LIBRARIES oksdbinterfaces::oksdbinterfaces okssystem::okssystem logging::logging) ``` -`core.schema.xml` gets fed into `daq_oks_codegen` which proceeds to (1) generate code off of the classes defined in `core.schema.xml` and (2) produce a shared object library which you can subsequently refer to as `dal_oks`. Details on `daq_oks_codegen` can be found [here](https://github.com/DUNE-DAQ/genconfig/tree/develop#readme). +`core.schema.xml` gets fed into `daq_oks_codegen` which proceeds to generate code off of the classes defined in `core.schema.xml` that will subsequently be built into the package's main library. Details on `daq_oks_codegen` can be found [here](https://dune-daq-sw.readthedocs.io/en/latest/packages/daq-cmake/#daq_oks_codegen). You'll notice also that the classes in `core.schema.xml` contain not only Attributes and Relationships as in the tutorial example above, but also Methods. If you look at the `Partition` class (l. 415) and scroll down a bit, you'll see a `get_all_applications` Method declared, along with its accompanying C++ declaration (as well as Java declaration, but we ignore this). The implementation of `get_all_applications` needs to be done manually, however, and is accomplished on l. 1301 of `src/algorithms.cpp`. If you scroll to the top of that file you'll see a `#include "dal/Partition.hpp"` line. In the actual dal repo, there's no such include file. However, assuming you followed the build instructions at the top of this document, you'll find it in the `build/` area of your work area, as the header was in fact generated.