File: rules

package info (click to toggle)
opensurgsim 0.7.0-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 23,744 kB
  • sloc: cpp: 135,363; ansic: 4,206; python: 3,934; makefile: 38
file content (47 lines) | stat: -rwxr-xr-x 1,261 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=-format,+bindnow
export GOOGLEMOCK_DIR = /usr/src/googletest/googlemock

%:
	dh $@ --with linktree

ifeq (,$(filter $(DEB_BUILD_ARCH),i386 arm64 armel armhf powerpc ppc64el ppc64))
    EIGEN_ALIGNMENT=ON
else
    EIGEN_ALIGNMENT=OFF
endif

ifeq ($(DEB_TARGET_ARCH_OS),linux)
    BUILD_DEVICE_MULTIAXIS=ON
else
    BUILD_DEVICE_MULTIAXIS=OFF
endif

override_dh_auto_configure:
	dh_auto_configure -- \
	-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \
	-DCMAKE_INSTALL_PREFIX:PATH=/usr \
	-DBUILD_DEVICE_MULTIAXIS:BOOL=$(BUILD_DEVICE_MULTIAXIS) \
	-DBUILD_DOCUMENTATION:BOOL=ON \
	-DBUILD_EXAMPLES:BOOL=OFF \
	-DBUILD_SHARED_LIBS:BOOL=ON \
	-DBUILD_TESTING_EIGEN:BOOL=ON \
	-DCTEST_CUSTOM_TESTS_IGNORE="MultiAxisDeviceTest" \
	-DEIGEN_ALIGNMENT=$(EIGEN_ALIGNMENT) \
	-DUSE_SYSTEM_YAMLCPP:BOOL=ON

override_dh_install:
	dh_install --exclude=gmock --exclude=gtest

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifeq (,$(filter $(DEB_BUILD_ARCH), armhf))
	@echo "Do normal testing for all architectures except armhf"
	dh_auto_test
else
	@echo "ignore test failures for armhf but leave it as output in the logs"
	# see https://bugs.debian.org/847321
	dh_auto_test || true
endif
endif