#!/usr/bin/make -f
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed


%:
	dh $@

override_dh_auto_install:
	dh_auto_install -X .md5

override_dh_auto_configure:
	dh_auto_configure -- -DTESTS_USE_FORCED_PMEM=1 -DTESTS_TBB=ON

TEST_EXCLUDES := cond_var_posix_0_helgrind
ifeq ($(DEB_HOST_ARCH),ppc64el)
TEST_EXCLUDES := $(TEST_EXCLUDES)|mpsc_.*|concurrent_hash_map_layout_0_none
endif

override_dh_auto_test:
	cd obj-$(DEB_HOST_GNU_TYPE) && \
		ctest -j `nproc` --output-on-failure --force-new-ctest-process \
			-E '$(TEST_EXCLUDES)'
