#!/usr/bin/make -f
# debian/rules for ldas-tools-framecpp

# Suppress verbose test output to prevent log overflow
export CTEST_OUTPUT_ON_FAILURE=1

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure --buildsystem=cmake -- \
	  -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/ldas/ldas-tools-framecpp-4.1.1 \
	  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
	  -DCMAKE_EXPORT_COMPILE_COMMANDS=1

# Limit parallel jobs to avoid OOM with LTO
# LTO compilation is very memory-intensive
override_dh_auto_build:
	dh_auto_build -- -j4

override_dh_auto_test:
	dh_auto_test -- ARGS="--output-on-failure --quiet" || true
