unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 8feb44acbfab64a91faf6944d10d8f4ecfa4065c 1126 bytes (raw)
name: gnu/packages/patches/lib2geom-enable-assertions.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
From 4aa78f52232682b353eb15c219171e466987bac7 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Thu, 16 Jan 2020 00:19:29 -0500
Subject: [PATCH] build: Enable assertions for the RelWithDebugInfo build type.

This fixes issue #5 (see:
https://gitlab.com/inkscape/lib2geom/issues/5).

* CMakeLists.txt: Remove the "-DNDEBUG" CXX flag from the default
configuration for the RelWithDebugInfo build type.
---
 CMakeLists.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bfeb8f03..a663a1b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,14 @@ enable_testing()
 
 include(CheckCXXSourceCompiles)
 
+# Enable assertions for the RelWithDebugInfo build type.  This is
+# useful as some tests make use of it (see:
+# https://gitlab.com/inkscape/lib2geom/issues/5).
+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+  string(REPLACE "-DNDEBUG" ""
+    CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+endif()
+
 # Find dependencies
 find_package(Boost 1.40 REQUIRED)
 find_package(DoubleConversion REQUIRED)
-- 
2.24.1


debug log:

solving 8feb44acbf ...
found 8feb44acbf in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).