#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

.PHONY: override_dh_auto_configure \
        override_dh_auto_test

ifeq ($(DEB_HOST_ARCH),i386)
  CXXFLAGS += -ffloat-store
endif

override_dh_auto_configure:
	dh_auto_configure -- \
                -DUSE_HOST_SSE_FLAGS:BOOL=False \
                -DUSE_IGN_RECOMMENDED_FLAGS:BOOL=False

override_dh_install:
	dh_install
	# remove duplicate eigen files from mathx-dev.install regexp
	cd debian/libignition-math-eigen3-dev; find . -type f -exec rm -f ../libignition-math-dev/{} \;
	find debian/libignition-math-dev -type d -empty -delete

override_dh_auto_test:
	dh_auto_test $@ --no-parallel --buildsystem=cmake

%:
	dh $@ --buildsystem=cmake
