114 Star 0 Fork 10

src-openEuler/cmocka

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
cmocka.spec 2.54 KB
一键复制 编辑 原始数据 按行查看 历史
Funda Wang 提交于 2024-11-04 18:01 . disable LTO build
%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.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/cmocka.git
git@gitee.com:src-openeuler/cmocka.git
src-openeuler
cmocka
cmocka
master

搜索帮助