Update to 2.7
- Add the following patches: cppcheck-2.7-tinyxml2.patch cppcheck-2.7-disable-test-testmathlib-tostring.patch - Remove patch: cppcheck-2.5-disable-test-testexprengine-array7.patch
This commit is contained in:
parent
d2128a85bc
commit
84bdb32ee3
1
.gitignore
vendored
1
.gitignore
vendored
@ -47,3 +47,4 @@ cppcheck-1.44.tar.bz2
|
||||
/cppcheck-2.3.tar.gz
|
||||
/cppcheck-2.5.tar.gz
|
||||
/cppcheck-2.6.tar.gz
|
||||
/cppcheck-2.7.tar.gz
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/test/testexprengine.cpp b/test/testexprengine.cpp
|
||||
index f23671a3d..c6069b49c 100644
|
||||
--- a/test/testexprengine.cpp
|
||||
+++ b/test/testexprengine.cpp
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
TEST_CASE(array4);
|
||||
TEST_CASE(array5);
|
||||
TEST_CASE(array6);
|
||||
- TEST_CASE(array7);
|
||||
+ // TEST_CASE(array7);
|
||||
TEST_CASE(arrayInit1);
|
||||
TEST_CASE(arrayInit2);
|
||||
TEST_CASE(arrayInit3);
|
13
cppcheck-2.7-disable-test-testmathlib-tostring.patch
Normal file
13
cppcheck-2.7-disable-test-testmathlib-tostring.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/test/testmathlib.cpp b/test/testmathlib.cpp
|
||||
index 4171a6a7a..fd0a84e52 100644
|
||||
--- a/test/testmathlib.cpp
|
||||
+++ b/test/testmathlib.cpp
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
TEST_CASE(cos);
|
||||
TEST_CASE(tan);
|
||||
TEST_CASE(abs);
|
||||
- TEST_CASE(toString);
|
||||
+ // TEST_CASE(toString);
|
||||
TEST_CASE(CPP14DigitSeparators);
|
||||
}
|
||||
|
80
cppcheck-2.7-tinyxml2.patch
Normal file
80
cppcheck-2.7-tinyxml2.patch
Normal file
@ -0,0 +1,80 @@
|
||||
diff --git a/gui/test/benchmark/simple/CMakeLists.txt b/gui/test/benchmark/simple/CMakeLists.txt
|
||||
index 78cf81270..25e787819 100644
|
||||
--- a/gui/test/benchmark/simple/CMakeLists.txt
|
||||
+++ b/gui/test/benchmark/simple/CMakeLists.txt
|
||||
@@ -1,11 +1,13 @@
|
||||
qt5_wrap_cpp(test-benchmark-simple_SRC benchmarksimple.h)
|
||||
add_custom_target(build-testbenchmark-simple-deps SOURCES ${test-benchmark-simple_SRC})
|
||||
add_dependencies(gui-build-deps build-testbenchmark-simple-deps)
|
||||
+if(USE_BUNDLED_TINYXML2)
|
||||
+ list(APPEND test-benchmark-simple_SRC $<TARGET_OBJECTS:tinyxml2_objs>)
|
||||
+endif()
|
||||
add_executable(benchmark-simple
|
||||
${test-benchmark-simple_SRC}
|
||||
benchmarksimple.cpp
|
||||
$<TARGET_OBJECTS:lib_objs>
|
||||
- $<TARGET_OBJECTS:tinyxml2_objs>
|
||||
$<TARGET_OBJECTS:simplecpp_objs>
|
||||
)
|
||||
target_include_directories(benchmark-simple PRIVATE ${CMAKE_SOURCE_DIR}/lib)
|
||||
@@ -16,4 +18,7 @@ if (HAVE_RULES)
|
||||
endif()
|
||||
if (USE_Z3)
|
||||
target_link_libraries(benchmark-simple ${Z3_LIBRARIES})
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
+endif()
|
||||
+if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
||||
+ target_link_libraries(benchmark-simple tinyxml2)
|
||||
+endif()
|
||||
diff --git a/gui/test/xmlreportv2/CMakeLists.txt b/gui/test/xmlreportv2/CMakeLists.txt
|
||||
index a244ea722..5dd39465c 100644
|
||||
--- a/gui/test/xmlreportv2/CMakeLists.txt
|
||||
+++ b/gui/test/xmlreportv2/CMakeLists.txt
|
||||
@@ -22,4 +22,7 @@ if (HAVE_RULES)
|
||||
endif()
|
||||
if (USE_Z3)
|
||||
target_link_libraries(test-xmlreportv2 ${Z3_LIBRARIES})
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
+endif()
|
||||
+if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
||||
+ target_link_libraries(test-xmlreportv2 tinyxml2)
|
||||
+endif()
|
||||
diff --git a/oss-fuzz/CMakeLists.txt b/oss-fuzz/CMakeLists.txt
|
||||
index c0fbd4d1c..5b2c5e059 100644
|
||||
--- a/oss-fuzz/CMakeLists.txt
|
||||
+++ b/oss-fuzz/CMakeLists.txt
|
||||
@@ -1,11 +1,19 @@
|
||||
if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
- add_executable(fuzz-client EXCLUDE_FROM_ALL
|
||||
+ set(fuzz-client_SRC
|
||||
main.cpp
|
||||
type2.cpp
|
||||
+ )
|
||||
+ if(USE_BUNDLED_TINYXML2)
|
||||
+ list(APPEND fuzz-client_SRC $<TARGET_OBJECTS:tinyxml2_objs>)
|
||||
+ endif()
|
||||
+ add_executable(fuzz-client EXCLUDE_FROM_ALL
|
||||
+ ${fuzz-client_SRC}
|
||||
$<TARGET_OBJECTS:simplecpp_objs>
|
||||
- $<TARGET_OBJECTS:tinyxml2_objs>
|
||||
$<TARGET_OBJECTS:lib_objs>)
|
||||
- target_include_directories(fuzz-client PRIVATE ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/externals/simplecpp ${CMAKE_SOURCE_DIR}/externals/tinyxml2 ${CMAKE_SOURCE_DIR}/externals)
|
||||
+ target_include_directories(fuzz-client PRIVATE ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/externals/simplecpp ${CMAKE_SOURCE_DIR}/externals)
|
||||
+ if(USE_BUNDLED_TINYXML2)
|
||||
+ target_include_directories(fuzz-client PRIVATE ${CMAKE_SOURCE_DIR}/externals/tinyxml2/)
|
||||
+ endif()
|
||||
target_compile_options(fuzz-client PRIVATE -fsanitize=fuzzer)
|
||||
# TODO: target_link_options() requires CMake >= 3.13
|
||||
#target_link_options(fuzz-client PRIVATE -fsanitize=fuzzer)
|
||||
@@ -16,6 +24,9 @@ if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
if (USE_Z3)
|
||||
target_link_libraries(fuzz-client PRIVATE ${Z3_LIBRARIES})
|
||||
endif()
|
||||
+ if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
||||
+ target_link_libraries(fuzz-client PRIVATE tinyxml2)
|
||||
+ endif()
|
||||
|
||||
add_executable(translate EXCLUDE_FROM_ALL
|
||||
translate.cpp
|
@ -1,8 +1,8 @@
|
||||
%undefine __cmake_in_source_build
|
||||
|
||||
Name: cppcheck
|
||||
Version: 2.6
|
||||
Release: 2%{?dist}
|
||||
Version: 2.7
|
||||
Release: 1%{?dist}
|
||||
Summary: Tool for static C/C++ code analysis
|
||||
License: GPLv3+
|
||||
URL: http://cppcheck.wiki.sourceforge.net/
|
||||
@ -12,9 +12,11 @@ Source0: https://github.com/danmar/%{name}/archive/%{version}.tar.gz#/%{n
|
||||
Patch0: cppcheck-2.2-translations.patch
|
||||
# Select python3 explicitly
|
||||
Patch1: cppcheck-1.88-htmlreport-python3.patch
|
||||
# Disable one test, which fails under 32-bit archs i686 and armv7hl
|
||||
# https://trac.cppcheck.net/ticket/10282
|
||||
Patch2: cppcheck-2.5-disable-test-testexprengine-array7.patch
|
||||
# Disable one test, which fails under ppc64le
|
||||
# test/testmathlib.cpp:1246(TestMathLib::toString): Assertion failed.
|
||||
Patch2: cppcheck-2.7-disable-test-testmathlib-tostring.patch
|
||||
# https://github.com/danmar/cppcheck/commit/974dd5d
|
||||
Patch3: cppcheck-2.7-tinyxml2.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pcre-devel
|
||||
@ -62,6 +64,7 @@ from xml files first generated using cppcheck.
|
||||
%patch0 -p1 -b .translations
|
||||
%patch1 -p1 -b .python3
|
||||
%patch2 -p1 -b .array7
|
||||
%patch3 -p1 -b .tinyxml2
|
||||
# Make sure bundled tinyxml2 is not used
|
||||
rm -r externals/tinyxml2
|
||||
# Generate the Qt online-help file
|
||||
@ -117,6 +120,9 @@ cd %{_vpath_builddir}/bin
|
||||
%{_bindir}/cppcheck-htmlreport
|
||||
|
||||
%changelog
|
||||
* Tue Feb 08 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.7-1
|
||||
- Update to 2.7.
|
||||
|
||||
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (cppcheck-2.6.tar.gz) = 6abe518cb9d80c4d0fcc5d47a317f45f177a30372846008f5c65352db91e7de74e6ec6d500d1d18b8cd29a91e3974df125efb35c14c7814c9640741b3827fc2a
|
||||
SHA512 (cppcheck-2.7.tar.gz) = 22da64126ec76fa2b3c533fe4c82d8c3a46a274bce78aa2495bffed5491c604891ba46684499a28a4a22ab928979e9388e52df36ad0e2b001b81619c26791aad
|
||||
|
Loading…
Reference in New Issue
Block a user