From: Alexander Stein <alexander.stein@mailbox.org>
To: linux-gpio@vger.kernel.org
Cc: Alexander Stein <alexander.stein@mailbox.org>
Subject: [libgpiod] [PATCH 2/5] bindings: cxx: Try using pkg-config to detect catch2
Date: Wed, 7 Aug 2019 21:51:29 +0200 [thread overview]
Message-ID: <20190807195132.7538-2-alexander.stein@mailbox.org> (raw)
In-Reply-To: <20190807195132.7538-1-alexander.stein@mailbox.org>
If there is no system wide package, try using a regular header as before.
Signed-off-by: Alexander Stein <alexander.stein@mailbox.org>
---
bindings/cxx/tests/Makefile.am | 2 +-
configure.ac | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/bindings/cxx/tests/Makefile.am b/bindings/cxx/tests/Makefile.am
index 155445f..d1da0d3 100644
--- a/bindings/cxx/tests/Makefile.am
+++ b/bindings/cxx/tests/Makefile.am
@@ -8,7 +8,7 @@
AM_CPPFLAGS = -I$(top_srcdir)/bindings/cxx/ -I$(top_srcdir)/include
AM_CPPFLAGS += -I$(top_srcdir)/tests/mockup/
-AM_CPPFLAGS += -Wall -Wextra -g -std=gnu++11
+AM_CPPFLAGS += -Wall -Wextra -g -std=gnu++11 $(CATCH2_CFLAGS)
AM_LDFLAGS = -lgpiodcxx -L$(top_builddir)/bindings/cxx/
AM_LDFLAGS += -lgpiomockup -L$(top_builddir)/tests/mockup/
AM_LDFLAGS += -pthread
diff --git a/configure.ac b/configure.ac
index 0459007..bf364e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,9 +164,11 @@ then
if test "x$with_tests" = xtrue
then
- AC_LANG_PUSH([C++])
- AC_CHECK_HEADERS([catch2/catch.hpp], [], [HEADER_NOT_FOUND_CXX([catch2/catch.hpp])])
- AC_LANG_POP([C++])
+ PKG_CHECK_MODULES([CATCH2], [catch2],, [
+ AC_LANG_PUSH([C++])
+ AC_CHECK_HEADERS([catch2/catch.hpp], [], [HEADER_NOT_FOUND_CXX([catch2/catch.hpp])])
+ AC_LANG_POP([C++])
+ ])
fi
fi
--
2.22.0
next prev parent reply other threads:[~2019-08-07 19:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 19:51 [libgpiod] [PATCH 1/5] bindings: cxx: Use 'upstream' include path Alexander Stein
2019-08-07 19:51 ` Alexander Stein [this message]
2019-08-07 19:51 ` [libgpiod] [PATCH 3/5] bindings: cxx: Split out catch's main() Alexander Stein
2019-08-07 19:51 ` [libgpiod] [PATCH 4/5] bindings: cxx: Fix compile errors Alexander Stein
2019-08-08 15:25 ` Bartosz Golaszewski
2019-08-08 15:37 ` Bartosz Golaszewski
2019-08-07 19:51 ` [libgpiod] [PATCH 5/5] bindings: cxx: Workaround --success run Alexander Stein
2019-08-08 15:27 ` Bartosz Golaszewski
2019-08-08 18:41 ` Alexander Stein
2019-08-09 6:55 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190807195132.7538-2-alexander.stein@mailbox.org \
--to=alexander.stein@mailbox.org \
--cc=linux-gpio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).