#!/usr/bin/make -f
# -*- makefile -*-

export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe
export OMPI_MCA_btl_tcp_if_include=lo

-include /usr/share/mpi-default-dev/debian_defaults

DEB_BUILD_MULTIARCH?=$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
DEB_HOST_ARCH?=$(shell dpkg-architecture -qDEB_HOST_ARCH)

%:
	dh $@ --buildsystem=cmake

ifneq (,$(filter $(DEB_HOST_ARCH), armel hppa riscv64))
execute_before_dh_auto_configure:
	rm -f tests/inputs/test_H2O.perf
	grep -v dbcsr_unittest2 tests/CMakeLists.txt | sponge tests/CMakeLists.txt
endif

override_dh_auto_configure:
	dh_auto_configure -- -DTEST_MPI_RANKS=1

override_dh_auto_test:
	dh_auto_test --no-parallel
