aboutsummaryrefslogtreecommitdiff
path: root/test/postinstall
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-04-25 15:29:47 +0200
committerEven Rouault <even.rouault@spatialys.com>2020-04-25 15:29:47 +0200
commit104011fe6a6e5ab6d97733f293aa5892c0646435 (patch)
tree0f1b06cb66b0f4be091082ac7c5cadd76f9f1eab /test/postinstall
parent4f1a05aa9589729b53a305353c30691aa733964f (diff)
downloadPROJ-104011fe6a6e5ab6d97733f293aa5892c0646435.tar.gz
PROJ-104011fe6a6e5ab6d97733f293aa5892c0646435.zip
postinstall checks: check that we include installed C++ headers (refs #2182)
Diffstat (limited to 'test/postinstall')
-rwxr-xr-xtest/postinstall/test_pkg-config.sh2
-rw-r--r--test/postinstall/testcpp/Makefile15
-rw-r--r--test/postinstall/testcpp/testcpp.cpp10
3 files changed, 27 insertions, 0 deletions
diff --git a/test/postinstall/test_pkg-config.sh b/test/postinstall/test_pkg-config.sh
index fc7fb8b7..98c0815e 100755
--- a/test/postinstall/test_pkg-config.sh
+++ b/test/postinstall/test_pkg-config.sh
@@ -80,4 +80,6 @@ make clean
cd ..
+(cd testcpp && make && make clean)
+
exit $ERRORS
diff --git a/test/postinstall/testcpp/Makefile b/test/postinstall/testcpp/Makefile
new file mode 100644
index 00000000..d6c47e65
--- /dev/null
+++ b/test/postinstall/testcpp/Makefile
@@ -0,0 +1,15 @@
+PROGRAM = testcpp
+OBJECTS = $(addsuffix .o,$(PROGRAM))
+
+override CXXFLAGS += -std=c++11 -fvisibility=hidden -g -Wall -Werror $(shell pkg-config proj --cflags)
+override LDFLAGS += $(shell pkg-config proj --libs)
+
+all: $(PROGRAM)
+
+$(PROGRAM): $(OBJECTS)
+ $(CXX) -o $@ $< $(LDFLAGS)
+
+clean:
+ $(RM) $(PROGRAM) $(OBJECTS)
+
+.PHONY: clean
diff --git a/test/postinstall/testcpp/testcpp.cpp b/test/postinstall/testcpp/testcpp.cpp
new file mode 100644
index 00000000..a03ca0ee
--- /dev/null
+++ b/test/postinstall/testcpp/testcpp.cpp
@@ -0,0 +1,10 @@
+#include <proj/io.hpp>
+#include <proj/crs.hpp>
+#include <proj/coordinateoperation.hpp>
+#include <proj/coordinatesystem.hpp>
+#include <proj/datum.hpp>
+
+int main(int /*argc */, char** /* argv */)
+{
+ return 0;
+}