#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

include /usr/share/dpkg/default.mk

# for hardening you might like to uncomment this:
# export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_POLICY_VERSION_MINIMUM=3.5
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_configure --sourcedirectory=tests --builddirectory=build-tests -- -DCMAKE_POLICY_VERSION_MINIMUM=3.5
endif

override_dh_auto_build:
	dh_auto_build
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_build --sourcedirectory=tests --builddirectory=build-tests
endif

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd build-tests && ./tsl_hopscotch_map_tests
endif
