Skip to content

Commit 71bbb87

Browse files
committed
Use CPPFLAGS (not CFLAGS) for header directories (mpsolve patch)
[ci skip]
1 parent 4fe769d commit 71bbb87

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

M2/libraries/mpsolve/patch-3.2.2

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,20 @@ Otherwise we get the following compile error in macOS:
1515
include/mps/types.h | 6 +++++-
1616
1 file changed, 5 insertions(+), 1 deletion(-)
1717

18-
diff --git a/include/mps/types.h b/include/mps/types.h
19-
index e3465aa5..4f427f59 100644
18+
From 449d608b360fea0056049d7f8e874ea022fadab5 Mon Sep 17 00:00:00 2001
19+
From: Doug Torrance <dtorrance@piedmont.edu>
20+
Date: Sat, 9 Aug 2025 09:49:08 -0400
21+
Subject: [PATCH] Use CPPFLAGS instead of CFLAGS for specifying header
22+
directories
23+
24+
CPPFLAGS appear before CFLAGS, so if the user passes some directories
25+
manually using CPPFLAGS, they will appear first. This is a problem if
26+
these directories contain older versions of the mpsolve headers. We
27+
want to ensure that the current versions are found first.
28+
---
29+
src/mpsolve/Makefile.am | 6 ++++--
30+
1 file changed, 4 insertions(+), 2 deletions(-)
31+
2032
--- a/include/mps/types.h
2133
+++ mpsolve-3.2.2/include/mps/types.h
2234
@@ -21,7 +21,11 @@ typedef bool mps_boolean;
@@ -32,6 +44,23 @@ index e3465aa5..4f427f59 100644
3244
#ifndef isnan
3345
# define isnan(x) \
3446
(sizeof(x) == sizeof(long double) ? isnan_ld (x) \
47+
--- a/src/mpsolve/Makefile.am
48+
+++ mpsolve-3.2.2/src/mpsolve/Makefile.am
49+
@@ -6,10 +6,12 @@ man_MANS = ${builddir}/mpsolve.1
50+
51+
EXTRA_DIST = mpsolve.1
52+
53+
-mpsolve_CFLAGS = \
54+
+mpsolve_CPPFLAGS = \
55+
-I${top_srcdir}/include \
56+
-I. \
57+
- -I${top_builddir}/include \
58+
+ -I${top_builddir}/include
59+
+
60+
+mpsolve_CFLAGS = \
61+
$(GMP_CFLAGS) \
62+
$(GTK_CFLAGS) \
63+
$(PTHREAD_CFLAGS) \
3564
--
3665
2.43.0
3766

0 commit comments

Comments
 (0)