代码拉取完成,页面将自动刷新
%define _lto_cflags %{nil}
%undefine __cmake_in_source_build
Name: cmocka
Version: 1.1.7
Release: 2
License: Apache-2.0
Summary: An elegant unit testing framework for C with support for mock objects
URL: https://cmocka.org
Source0: https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz
BuildRequires: gcc
BuildRequires: cmake >= 3.5.0
BuildRequires: doxygen
%description
Cmocka is an elegant unit testing framework for C with support for mock objects.
It only requires the standard C library, works on a range of computing platforms
(including embedded) and with different compilers.
This package is a library to simplify and generalize unit tests for C with
support for mock objects
%package -n libcmocka
Summary: Lightweight library to simplify and generalize unit tests for C
Conflicts: cmockery2
%description -n libcmocka
Cmocka is an elegant unit testing framework for C with support for mock objects.
It only requires the standard C library, works on a range of computing platforms
(including embedded) and with different compilers.
This package is a library to simplify and generalize unit tests for C with
support for mock objects
%package -n libcmocka-devel
Summary: Development headers for the cmocka library
Requires: libcmocka = %{version}-%{release}
Provides: libcmocka-static = %{version}-%{release}
Obsoletes: libcmocka-static < %{version}-%{release}
Conflicts: cmockery2-devel
%description -n libcmocka-devel
Development headers for the cmocka unit testing library.
%prep
%autosetup -p1
%build
%cmake \
-DWITH_STATIC_LIB=ON \
-DWITH_CMOCKERY_SUPPORT=ON \
-DUNIT_TESTING=ON
%cmake_build
%cmake_build --target docs
%install
%cmake_install
ln -s libcmocka.so %{buildroot}%{_libdir}/libcmockery.so
%check
%ctest
%files -n libcmocka
%license COPYING
%doc AUTHORS README.md ChangeLog
%{_libdir}/libcmocka.so.*
%files -n libcmocka-devel
%doc %{_vpath_builddir}/doc/html
%{_includedir}/*.h
%{_includedir}/cmockery
%{_libdir}/libcmocka.so
%{_libdir}/libcmockery.so
%{_libdir}/pkgconfig/cmocka.pc
%{_libdir}/cmake/cmocka
%changelog
* Sun Oct 06 2024 Funda Wang <fundawang@yeah.net> - 1.1.7-2
- Disable LTO build
- adopt to new cmake macro
* Wed Jun 21 2023 yaoxin <yao_xin001@hoperun.com> - 1.1.7-1
- Update to 1.1.7
* Mon May 31 2021 baizhonggui <baizhonggui@huawei.com> - 1.1.5-3
- Add gcc in BuildRequires
* Fri Jan 10 2020 chenli <chenli147@huawei.com> - 1.1.5-2
- Update version.
* Fri Nov 22 2019 Wanjiankang <wanjiankang@huawei.com> - 1.1.3-2
- Initial package.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。