diff --git a/test/postinstall/test_pkg-config.sh b/test/postinstall/test_pkg-config.sh index fc7fb8b774..98c0815eca 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 0000000000..d6c47e6565 --- /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 0000000000..a03ca0ee47 --- /dev/null +++ b/test/postinstall/testcpp/testcpp.cpp @@ -0,0 +1,10 @@ +#include +#include +#include +#include +#include + +int main(int /*argc */, char** /* argv */) +{ + return 0; +}