Update to new out-of-source build mechanism

This commit is contained in:
Neal Gompa 2020-07-18 14:50:59 -04:00
commit 10e3a173c0

View file

@ -1,3 +1,5 @@
# Force out of source build
%undefine __cmake_in_source_build
# uncomment to enable bootstrap mode
#global bootstrap 1
@ -57,26 +59,22 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} .. \
%{?tests:-DBUILD_TESTING:BOOL=ON}
popd
%make_build -C %{_target_platform}
%cmake_kf5 %{?tests:-DBUILD_TESTING:BOOL=ON}
%cmake_build
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install
%find_lang_kf5 analitza_qt
%check
%if 0%{?tests}
export CTEST_OUTPUT_ON_FAILURE=1
pushd "%{__cmake_builddir}"
xvfb-run -a \
make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||:
ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags} --timeout 300 ||:
popd
%endif