#!/usr/bin/make -f

%:
	dh $@ --buildsystem=cmake

# The CMake test suite only builds test/test.cpp, so build and run the example
# next to it here.
override_dh_auto_test:
	dh_auto_test
	mkdir -p test-example
	cd test-example && \
	    $(CXX) -O2 -std=c++11 -I../include -o example ../test/example.cpp && \
	    ./example > /dev/null
	rm -rf test-example
