Re: [PATCH] catch: directory is now catch2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/30/19 10:48 AM, Christophe Fergeau wrote:
On Tue, Jan 29, 2019 at 05:51:54PM +0200, Uri Lublin wrote:
Upstream and since Fedora 27

Signed-off-by: Uri Lublin <uril@xxxxxxxxxx>
---

Another option is to check both catch/ and catch2/
and pick the one that is installed on the system, if any

---
  configure.ac                          | 4 ++--
  src/unittests/test-mjpeg-fallback.cpp | 2 +-
  src/unittests/test-stream-port.cpp    | 2 +-
  3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index c259f7e..321dea3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,9 +119,9 @@ case "$enable_tests" in
    *) AC_MSG_ERROR([bad value ${enable_tests} for enable-tests option]) ;;
  esac
  AS_IF([test "x$enable_tests" != "xno"],
-      [AC_CHECK_HEADER([catch/catch.hpp],have_check="yes",)])
+      [AC_CHECK_HEADER([catch2/catch.hpp],have_check="yes",)])
  AS_IF([test "x$enable_tests" = "xyes" && test "x$have_check" != "xyes"],
-      [AC_MSG_ERROR([Could not find Catch dependency header (catch/catch.hpp)])])
+      [AC_MSG_ERROR([Could not find Catch dependency header (catch2/catch.hpp)])])

catch2 ships a .pc file, it would be better to use this rather than
manually check for includes.

Hi,
I noticed it, but
1. catch1 does not support it (although this patch ignores catch1).
2. Their pc file has a problem -- pkg-config --cflags catch2 -- returns nothing.
After modifying /usr/share/pkgconfig/catch2.pc locally it (pkg-config)
works for me.

diff -u a/catch2.pc b/catch2.pc
--- a/catch2.pc	2019-01-30 11:04:41.690516483 +0200
+++ b/catch2.pc	2019-01-30 11:04:11.048686115 +0200
@@ -4,4 +4,4 @@
 Description: A modern, C++-native, header-only, test framework for C++11
 URL: https://github.com/catchorg/Catch2
 Version: 2.4.1
-Cflags: -I${includedir}
+Cflags: -I${includedir}/catch2


Uri.
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]