#!/usr/bin/make -f

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

ifneq (,$(filter $(DEB_BUILD_ARCH),ppc64el alpha ppc64 sparc64))
  RUN_TESTS=
else
  RUN_TESTS=-DKokkos_ENABLE_TESTS=ON
endif

override_dh_auto_configure:
	dh_auto_configure -- \
	-DCMAKE_INSTALL_INCLUDEDIR="/usr/include/kokkos" \
	-DBUILD_SHARED_LIBS=ON \
	-DKokkos_ENABLE_OPENMP=ON \
	$(RUN_TESTS)

# Tests use all CPUs and would run into time outs when blocked
override_dh_auto_test:
	dh_auto_test --no-parallel
