* debian/patches/10_mimalloc_restrict_cpu_yield.patch: enhanced with better
atomic yield for SSE2 (if available) and better/added ops for arm64,
armel, and ppc64{el,}/powerpc. Closes: #980169
+ * Run the build-time tests as part of the build on amd64.
-- Michael R. Crusoe <crusoe@debian.org> Sat, 23 Jan 2021 15:40:21 +0100
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mips mipsel powerpc sh4))
export DEB_CXXFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
endif
-DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/default.mk
+
+# Tell CMake what the package version will be, to embed in the version string.
+# We do this for upstream's benefit, in lieu of including a git commit hash.
+CMAKEOPTS=-DDEBVERSION=$(DEB_VERSION)
+
+#speed up the build if we are skipping the tests
+ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ifneq (amd64,$(DEB_HOST_ARCH))
+CMAKEOPTS+= -DENABLE_TESTS=off
+endif
+endif
%:
dh $@
-# Tell CMake what the package version will be, to embed in the version string.
-# We do this for upstream's benefit, in lieu of including a git commit hash.
override_dh_auto_configure:
- dh_auto_configure -- -DDEBVERSION=$(DEB_VERSION)
+ dh_auto_configure -- $(CMAKEOPTS)
+
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ifeq (amd64,$(DEB_HOST_ARCH))
+ cd obj-* && $(MAKE) -j$(nproc) test_solvespace
+endif
+endif