代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/cppcheck 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Name: cppcheck
Version: 2.18.0
Release: 1
Summary: Tool for static C/C++ code analysis
License: GPL-3.0-or-later
URL: https://cppcheck.sourceforge.io/
Source0: https://github.com/danmar/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0000: cppcheck-2.2-translations.patch
BuildRequires: gcc-c++ pcre-devel docbook-style-xsl libxslt desktop-file-utils tinyxml2-devel >= 2.1.0
BuildRequires: cmake >= 3.13
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6Gui)
BuildRequires: cmake(Qt6Help)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: cmake(Qt6Network)
BuildRequires: cmake(Qt6PrintSupport)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: qt6-doctools
BuildRequires: boost-devel
BuildRequires: python3 >= 3.7
Requires: python3-pygments python3-unversioned-command
Provides: %{name}-htmlreport = %{version}-%{release}
Obsoletes: %{name}-htmlreport < %{version}-%{release}
%description
Cppcheck is a static analysis tool for C/C++ code.
Cppcheck primarily detects only real errors in the code (i.e. have zero false positives)
instead of syntax errors which C/C++ compilers and many other analysis tools detect commonly.
%package gui
Summary: Graphical user interface for cppcheck
Requires: %{name}%{?_isa} = %{version}-%{release}
%description gui
This package contains the graphical user interface for cppcheck.
%package_help
%prep
%autosetup -p1
rm -r externals/tinyxml2
cd gui/help
%{_qt6_libexecdir}/qhelpgenerator online-help.qhcp -o online-help.qhc
%build
%make_build DB2MAN=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl man
xsltproc --nonet -o man/manual.html %{_datadir}/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl man/manual-ja.docbook
%cmake \
-DCMAKE_BUILD_TYPE=Release \
-DHAVE_RULES=1 \
-DUSE_MATCHCOMPILER=yes \
-DBUILD_GUI=1 \
-DUSE_QT6=1 \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DBUILD_TESTS=1 \
-DCFGDIR=%{_datadir}/CppCheck \
-DUSE_BUNDLED_TINYXML2=OFF \
-DENABLE_OSS_FUZZ=OFF \
-DUSE_BOOST=1
%cmake_build
%install
%cmake_install
install -D -p -m 644 cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
install -D -p -m 755 htmlreport/cppcheck-htmlreport %{buildroot}%{_bindir}/cppcheck-htmlreport
# Install desktop file
desktop-file-validate %{buildroot}%{_datadir}/applications/cppcheck-gui.desktop
# Install logo
install -D -p -m 644 gui/cppcheck-gui.png %{buildroot}%{_datadir}/pixmaps/cppcheck-gui.png
# Install the Qt online-help file
install -D -p -m 644 gui/help/online-help.qhc %{buildroot}%{_datadir}/Cppcheck/help/online-help.qhc
install -D -p -m 644 gui/help/online-help.qch %{buildroot}%{_datadir}/Cppcheck/help/online-help.qch
rm -fr %{buildroot}%{_libidr} %{buildroot}%{_usrsrc}
%check
%ctest -E "TestCppcheck|TestCondition"
%files
%license COPYING
%doc AUTHORS
%{_datadir}/Cppcheck
%{_bindir}/cppcheck
%{_bindir}/cppcheck-htmlreport
%files gui
%{_bindir}/cppcheck-gui
%{_datadir}/applications/cppcheck-gui.desktop
%{_datadir}/pixmaps/cppcheck-gui.png
%{_datadir}/icons/hicolor/64x64/apps/cppcheck-gui.png
%{_datadir}/icons/hicolor/scalable/apps/cppcheck-gui.svg
%files help
%doc man/manual.html
%{_mandir}/man1/cppcheck.1*
%changelog
* Thu Jul 24 2025 Funda Wang <fundawang@yeah.net> - 2.18.0-1
- update to 2.18.0
* Thu Jul 03 2025 wangkai <13474090681@163.com> - 2.17.1-1
- Update to 2.17.1
* Thu Nov 28 2024 xu_ping <707078654@qq.com> - 2.16.0-1
- Upgrade to version 2.16.0.
* Removed CMake option 'USE_THREADS' in favor of 'DISALLOW_THREAD_EXECUTOR'.
* Removed deprecated 'Makefile' option 'SRCDIR'.
* Added CMake option 'DISALLOW_THREAD_EXECUTOR' to control the inclusion of
the executor which performs the analysis within a thread of the main process.
* Removed deprecated platform type 'Unspecified'
* Do not show messages during analysis that are inactivated in the toolbar
* implement evaluation order checker for c++11 and later
* Add "remark comments" that can be used to generate reports with justifications for warnings
* Added command-line option --cpp-header-probe
* The maximum value for --max-ctu-depth is currently capped at 10
* The previously deprecated support for Python 2.7 has been removed
* The new option --check-level= has been added that controls how much checking is made by Cppcheck.
The default checking level is "normal". If you feel that you can wait longer on results you can use --check-level=exhaustive.
* Thu Nov 21 2024 Funda Wang <fundawang@yeah.net> - 2.13.2-2
- adopt to new cmake macro
* Thu Feb 1 2024 liyanan <liyanan61@h-partners.com> - 2.13.2-1
- Upgrade to version 2.13.2.
* Tue Jul 25 2023 xu_ping <707078654@qq.com> - 2.11.1-1
- Upgrade to version 2.11.1.
* Tue Jan 18 2022 SimpleUpdate Robot <tc@openeuler.org> - 2.6.3-1
- Upgrade to version 2.6.3
* Tue Aug 10 2021 Shenmei Tu <tushenmei@huawei.com> - 1.83-8
- bugfix-SIGSTKSZ-not-constant.patch
* Thu Mar 04 2021 maminjie <maminjie1@huawei.com> - 1.83-7
- Add requires python3-unversioned-command to resolve compatibility
* Fri Sep 11 2020 wutao <wutao61@huawei.com> - 1.83-6
- change requires to python3
* Mon Nov 18 2019 lihao <lihao129@huawei.com> - 1.83-5
- Package Init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。