Skip to content

Commit

Permalink
postinstall checks: check that we include installed C++ headers (refs O…
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Apr 25, 2020
1 parent 4f1a05a commit 104011f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/postinstall/test_pkg-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,6 @@ make clean

cd ..

(cd testcpp && make && make clean)

exit $ERRORS
15 changes: 15 additions & 0 deletions test/postinstall/testcpp/Makefile
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions test/postinstall/testcpp/testcpp.cpp
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 104011f

Please sign in to comment.