From: Kienan Stewart Date: Thu, 21 Sep 2023 15:49:27 +0000 (-0400) Subject: tests: Add POPT_CFLAGS to gen-ust-events-ns and gen-ns-events X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=765280660b3e6cabb64dab70eb54eda18ee3fd08;p=lttng-tools.git tests: Add POPT_CFLAGS to gen-ust-events-ns and gen-ns-events Observed issue ============== When building in an environment where popt was in a non-standard location, the builds for these two test binaries failed with the following error: ``` gen-ns-events.cpp:19:10: fatal error: popt.h: No such file or directory 19 | #include | ^~~~~~~~ ``` Solution ======== Set the binary-specific CPPFLAGS in the `Makefile.am` Known drawbacks =============== None Change-Id: I5563e24f330be86d630c68c32eaafaedf53a6c87 Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- diff --git a/tests/utils/testapp/gen-ns-events/Makefile.am b/tests/utils/testapp/gen-ns-events/Makefile.am index 5c1cddefe..b556aa96f 100644 --- a/tests/utils/testapp/gen-ns-events/Makefile.am +++ b/tests/utils/testapp/gen-ns-events/Makefile.am @@ -5,6 +5,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -I$(srcdir) \ noinst_PROGRAMS = gen-ns-events gen_ns_events_SOURCES = gen-ns-events.cpp +gen_ns_events_CPPFLAGS = $(POPT_CFLAGS) $(AM_CPPFLAGS) gen_ns_events_LDADD = \ $(top_builddir)/tests/utils/libtestutils.la \ $(DL_LIBS) $(POPT_LIBS) diff --git a/tests/utils/testapp/gen-ust-events-ns/Makefile.am b/tests/utils/testapp/gen-ust-events-ns/Makefile.am index 22242fb92..1e0a80c4e 100644 --- a/tests/utils/testapp/gen-ust-events-ns/Makefile.am +++ b/tests/utils/testapp/gen-ust-events-ns/Makefile.am @@ -17,6 +17,7 @@ gen_ust_events_ns_SOURCES = \ gen-ust-events-ns.cpp \ tp.c \ tp.h +gen_ust_events_ns_CPPFLAGS = $(POPT_CFLAGS) $(AM_CPPFLAGS) gen_ust_events_ns_LDADD = $(UST_LIBS) -llttng-ust-fork \ $(top_builddir)/tests/utils/libtestutils.la \ $(DL_LIBS) $(POPT_LIBS)