Fix cmake build.

This commit is contained in:
Vasiliy Glazov 2020-07-28 12:25:41 +03:00
parent b84e53d227
commit f4d910f5ad
1 changed files with 7 additions and 12 deletions

View File

@ -45,22 +45,17 @@ scram GUI.
sed -i 's|BOOST_THROW_EXCEPTION_CURRENT_FUNCTION|BOOST_CURRENT_FUNCTION|' src/error.h
%build
mkdir build
pushd build
export CXXFLAGS="%{__global_compiler_flags} -I/usr/include/catch"
%cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
export CXXFLAGS="%{__global_compiler_flags} -I/usr/include/catch"
%cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
%if 0%{?enable_tests}
-DBUILD_TESTING=ON \
-DBUILD_TESTING=ON \
%endif
..
%make_build
popd
%{nil}
%cmake_build
%install
pushd build
%make_install
popd
%cmake_install
install -p -D -m 644 %{SOURCE1} -t %{buildroot}%{_mandir}/man1/
install -p -D -m 644 scripts/%{name} %{buildroot}%{_datadir}/bash-completion/completions/%{name}
%if 0%{?enable_tests}