#!/usr/bin/make -f

export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

#ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
#	ENABLE_TESTS := ON
#else
#	ENABLE_TESTS := OFF
#endif

ENABLE_TESTS := OFF

%:
	echo foobar
	echo DEB_BUILD_PROFILES: $(DEB_BUILD_PROFILES)
	echo ENABLE_TESTS: $(ENABLE_TESTS)
	dh $@  --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- \
	    -DCMAKE_VERBOSE_MAKEFILE=ON \
	    -DCATKIN_ENABLE_TESTING=$(ENABLE_TESTS)

#override_dh_auto_test:
#ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
#	make -C obj-$(DEB_HOST_GNU_TYPE) \
#	    run_tests_cxx-serial_gtest_cxx-serial-test
#endif
