From 39b7f672869f4b412b9c41ba29f6750a575e0fb4 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Tue, 5 Apr 2022 18:06:04 +0200 Subject: [PATCH] - bcond_with tests --- kf5-purpose.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kf5-purpose.spec b/kf5-purpose.spec index 607c90d..03ea903 100644 --- a/kf5-purpose.spec +++ b/kf5-purpose.spec @@ -1,3 +1,6 @@ +# +# Conditional build: +%bcond_with tests # build with tests %define kdeframever 5.92 %define qtver 5.9.0 %define kfname purpose @@ -70,10 +73,16 @@ Pliki nagłówkowe dla programistów używających %{kfname}. install -d build cd build %cmake -G Ninja \ + %{!?with_tests:-DBUILD_TESTING=OFF} \ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ ../ %ninja_build +%if %{with tests} +ctest +%endif + + %install rm -rf $RPM_BUILD_ROOT %ninja_install -C build -- 2.44.0