From 890520028d11bfc048ec225e913993f0db0a1f8a Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 5 Feb 2024 11:42:03 -0500 Subject: [PATCH] src/Makefile.am: add libcpp-common convenience library Some following commits are expected to add .cpp files to the cpp-common library. Turn it into a convenience libtool library. Add a temporary dummy.cpp file, since some platforms don't like building a library without at least one compiled source file. Change-Id: I702b242ca2d229ab5064ba36d422368fd9a03909 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/11715 Tested-by: jenkins Reviewed-by: Philippe Proulx --- src/Makefile.am | 116 +++++++++++++++++----------------- src/cpp-common/bt2c/dummy.cpp | 0 2 files changed, 59 insertions(+), 57 deletions(-) create mode 100644 src/cpp-common/bt2c/dummy.cpp diff --git a/src/Makefile.am b/src/Makefile.am index cd23468a..3427a88d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,63 +11,6 @@ if ENABLE_PYTHON_BINDINGS SUBDIRS += bindings/python/bt2 endif -noinst_HEADERS = \ - cpp-common/bt2/borrowed-object-iterator.hpp \ - cpp-common/bt2/borrowed-object-proxy.hpp \ - cpp-common/bt2/borrowed-object.hpp \ - cpp-common/bt2/clock-class.hpp \ - cpp-common/bt2/clock-snapshot.hpp \ - cpp-common/bt2/component-port.hpp \ - cpp-common/bt2/exc.hpp \ - cpp-common/bt2/field-class.hpp \ - cpp-common/bt2/field-path.hpp \ - cpp-common/bt2/field.hpp \ - cpp-common/bt2/integer-range-set.hpp \ - cpp-common/bt2/integer-range.hpp \ - cpp-common/bt2/internal/utils.hpp \ - cpp-common/bt2/logging.hpp \ - cpp-common/bt2/message-array.hpp \ - cpp-common/bt2/message-iterator.hpp \ - cpp-common/bt2/message.hpp \ - cpp-common/bt2/optional-borrowed-object.hpp \ - cpp-common/bt2/plugin-dev.hpp \ - cpp-common/bt2/plugin.hpp \ - cpp-common/bt2/private-query-executor.hpp \ - cpp-common/bt2/raw-value-proxy.hpp \ - cpp-common/bt2/self-component-class.hpp \ - cpp-common/bt2/self-component-port.hpp \ - cpp-common/bt2/self-message-iterator-configuration.hpp \ - cpp-common/bt2/self-message-iterator.hpp \ - cpp-common/bt2/shared-object.hpp \ - cpp-common/bt2/trace-ir.hpp \ - cpp-common/bt2/type-traits.hpp \ - cpp-common/bt2/value.hpp \ - cpp-common/bt2/wrap.hpp \ - cpp-common/bt2c/align.hpp \ - cpp-common/bt2c/c-string-view.hpp \ - cpp-common/bt2c/call.hpp \ - cpp-common/bt2c/endian.hpp \ - cpp-common/bt2c/exc.hpp \ - cpp-common/bt2c/glib-up.hpp \ - cpp-common/bt2c/lib-str.hpp \ - cpp-common/bt2c/libc-up.hpp \ - cpp-common/bt2c/logging.hpp \ - cpp-common/bt2c/prio-heap.hpp \ - cpp-common/bt2c/read-fixed-len-int.hpp \ - cpp-common/bt2c/safe-ops.hpp \ - cpp-common/bt2c/std-int.hpp \ - cpp-common/bt2c/type-traits.hpp \ - cpp-common/bt2c/uuid.hpp \ - cpp-common/bt2c/vector.hpp \ - cpp-common/bt2s/make-unique.hpp \ - cpp-common/bt2s/optional.hpp \ - cpp-common/bt2s/span.hpp \ - cpp-common/bt2s/string-view.hpp \ - cpp-common/vendor/nlohmann/json.hpp \ - cpp-common/vendor/optional-lite/optional.hpp \ - cpp-common/vendor/span-lite/span.hpp \ - cpp-common/vendor/string_view-standalone/string_view.hpp - ## This target generates an include file that contains the git version ## string of the current branch, it must be continuously updated when ## we build in the git repo and shipped in dist tarballs to reflect the @@ -110,6 +53,7 @@ noinst_LTLIBRARIES = \ autodisc/libautodisc.la \ common/libcommon.la \ compat/libcompat.la \ + cpp-common/libcpp-common.la \ cpp-common/vendor/fmt/libfmt.la \ ctfser/libctfser.la \ fd-cache/libfd-cache.la \ @@ -167,6 +111,64 @@ compat_libcompat_la_SOURCES = \ compat/unistd.h \ compat/utc.h +cpp_common_libcpp_common_la_SOURCES = \ + cpp-common/bt2/borrowed-object-iterator.hpp \ + cpp-common/bt2/borrowed-object-proxy.hpp \ + cpp-common/bt2/borrowed-object.hpp \ + cpp-common/bt2/clock-class.hpp \ + cpp-common/bt2/clock-snapshot.hpp \ + cpp-common/bt2/component-port.hpp \ + cpp-common/bt2/exc.hpp \ + cpp-common/bt2/field-class.hpp \ + cpp-common/bt2/field-path.hpp \ + cpp-common/bt2/field.hpp \ + cpp-common/bt2/integer-range-set.hpp \ + cpp-common/bt2/integer-range.hpp \ + cpp-common/bt2/internal/utils.hpp \ + cpp-common/bt2/logging.hpp \ + cpp-common/bt2/message-array.hpp \ + cpp-common/bt2/message-iterator.hpp \ + cpp-common/bt2/message.hpp \ + cpp-common/bt2/optional-borrowed-object.hpp \ + cpp-common/bt2/plugin-dev.hpp \ + cpp-common/bt2/plugin.hpp \ + cpp-common/bt2/private-query-executor.hpp \ + cpp-common/bt2/raw-value-proxy.hpp \ + cpp-common/bt2/self-component-class.hpp \ + cpp-common/bt2/self-component-port.hpp \ + cpp-common/bt2/self-message-iterator-configuration.hpp \ + cpp-common/bt2/self-message-iterator.hpp \ + cpp-common/bt2/shared-object.hpp \ + cpp-common/bt2/trace-ir.hpp \ + cpp-common/bt2/type-traits.hpp \ + cpp-common/bt2/value.hpp \ + cpp-common/bt2/wrap.hpp \ + cpp-common/bt2c/align.hpp \ + cpp-common/bt2c/c-string-view.hpp \ + cpp-common/bt2c/call.hpp \ + cpp-common/bt2c/dummy.cpp \ + cpp-common/bt2c/endian.hpp \ + cpp-common/bt2c/exc.hpp \ + cpp-common/bt2c/glib-up.hpp \ + cpp-common/bt2c/lib-str.hpp \ + cpp-common/bt2c/libc-up.hpp \ + cpp-common/bt2c/logging.hpp \ + cpp-common/bt2c/prio-heap.hpp \ + cpp-common/bt2c/read-fixed-len-int.hpp \ + cpp-common/bt2c/safe-ops.hpp \ + cpp-common/bt2c/std-int.hpp \ + cpp-common/bt2c/type-traits.hpp \ + cpp-common/bt2c/uuid.hpp \ + cpp-common/bt2c/vector.hpp \ + cpp-common/bt2s/make-unique.hpp \ + cpp-common/bt2s/optional.hpp \ + cpp-common/bt2s/span.hpp \ + cpp-common/bt2s/string-view.hpp \ + cpp-common/vendor/nlohmann/json.hpp \ + cpp-common/vendor/optional-lite/optional.hpp \ + cpp-common/vendor/span-lite/span.hpp \ + cpp-common/vendor/string_view-standalone/string_view.hpp + cpp_common_vendor_fmt_libfmt_la_SOURCES = \ cpp-common/vendor/fmt/args.h \ cpp-common/vendor/fmt/chrono.h \ diff --git a/src/cpp-common/bt2c/dummy.cpp b/src/cpp-common/bt2c/dummy.cpp new file mode 100644 index 00000000..e69de29b -- 2.34.1