File: rules

package info (click to toggle)
sptag 0.0~git20230301.0207479%2Bds-1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 4,880 kB
  • sloc: cpp: 24,234; python: 1,568; makefile: 19
file content (28 lines) | stat: -rwxr-xr-x 890 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
#!/usr/bin/make -f
#export DH_VERBOSE = 1

# tests usually take just under an hour
# repro build servers can take longer
# use 3h instead of the default 25m
TEST_ARGS = --timeout 10800

# ctest normally suppresses test output
# https://cmake.org/cmake/help/latest/manual/ctest.1.html#options
# debhelper 13.5 enables ctest output when build is not terse
# reimplement this when debhelper is too old to support this
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
DEBHELPER_VERSION = $(strip $(shell dpkg-query -f '$${Version}' -W debhelper))
DEBHELPER_OK = $(strip $(shell dpkg --compare-versions $(DEBHELPER_VERSION) ge 13.5~; echo $$?))
ifneq ($(DEBHELPER_OK),0)
	TEST_ARGS += --verbose
endif
endif

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic

%:
	dh $@ --buildsystem=cmake

override_dh_auto_test:
	dh_auto_test -- ARGS+="$(TEST_ARGS)"