tests: Add POPT_CFLAGS to gen-ust-events-ns and gen-ns-events
authorKienan Stewart <kstewart@efficios.com>
Thu, 21 Sep 2023 15:49:27 +0000 (11:49 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 21 Dec 2023 21:38:35 +0000 (16:38 -0500)
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 <popt.h>
      |          ^~~~~~~~
```

Solution
========

Set the binary-specific CPPFLAGS in the `Makefile.am`

Known drawbacks
===============

None

Change-Id: I5563e24f330be86d630c68c32eaafaedf53a6c87
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/utils/testapp/gen-ns-events/Makefile.am
tests/utils/testapp/gen-ust-events-ns/Makefile.am

index 5c1cddefeb09917e862c7b994ac084a05adc7987..b556aa96f24b62a46ed9e513f4e8f56055e571c1 100644 (file)
@@ -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)
index 22242fb92209455ae4a49b48d1d2c41751e6c370..1e0a80c4e09f7793b37b6a1f946f93a9bab5d989 100644 (file)
@@ -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)
This page took 0.025912 seconds and 4 git commands to generate.