#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all qa=+all
export DEB_CPPFLAGS_MAINT_APPEND = -DCPPHTTPLIB_USE_POLL
export LC_ALL = C.UTF-8

%:
	dh $@ --buildsystem=meson

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
test := true
else
test := false
endif

override_dh_auto_configure:
	dh_auto_configure -- \
		-Dcpp-httplib_compile=true \
		-Dcpp-httplib_test=$(test)

override_dh_auto_test:
	dh_auto_test -- \
		--timeout-multiplier=3 \
		--test-args='--gtest_filter=-*_Online'
