File: 0002-Rewrite-tests-Makefile.patch

package info (click to toggle)
libsimpleini 4.25%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 724 kB
  • sloc: cpp: 4,599; makefile: 75; sh: 3
file content (51 lines) | stat: -rw-r--r-- 1,369 bytes parent folder | download
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From e49c527c84f04de2413efce3a1fbfc59d21e8c52 Mon Sep 17 00:00:00 2001
From: yangfl <yangfl@users.noreply.github.com>
Date: Sat, 15 Jul 2023 12:24:10 +0800
Subject: [PATCH 2/3] Rewrite tests/Makefile

---
 tests/Makefile       | 22 ++++++++++++++++++++++
 tests/ts-generic.cpp |  1 -
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 tests/Makefile

diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..b4febe2
--- /dev/null
+++ b/tests/Makefile
@@ -0,0 +1,22 @@
+PKG_CONFIG?=pkg-config
+
+CXXFLAGS+=-Wall -std=c++17 -DSI_CONVERT_ICU -DSI_SUPPORT_IOSTREAMS
+LDFLAGS+=-lpthread -lgtest -lgtest_main -lpthread -lsimpleini $(shell $(PKG_CONFIG) --libs icu-io) -L.. -Wl,-rpath-link=$(pwd)
+
+OBJS=ts-bugfix.o ts-noconvert.o ts-quotes.o ts-roundtrip.o ts-snippets.o ts-utf8.o ts-numeric.o ts-boolean.o ts-sections.o ts-deletion.o ts-edgecases.o ts-multiline.o ts-casesensitivity.o ts-generic.o
+
+BIN=./tests
+
+all: test
+
+$(BIN): $(OBJS)
+	$(CXX) -o $(BIN) $(OBJS) $(LDFLAGS)
+
+clean:
+	rm -f core $(OBJS) $(BIN)
+
+test: $(BIN)
+	$(BIN)
+
+$(OBJS): ../SimpleIni.h
+
diff --git a/tests/ts-generic.cpp b/tests/ts-generic.cpp
index ecdf7cc..a3a8330 100644
--- a/tests/ts-generic.cpp
+++ b/tests/ts-generic.cpp
@@ -1,4 +1,3 @@
-#define SI_CONVERT_GENERIC
 #include "../SimpleIni.h"
 #include "gtest/gtest.h"
 
-- 
2.51.0