Update to 2.7.3
- Update tinyxml2 patch: cppcheck-2.7.3-tinyxml2.patch - Remove patch: cppcheck-2.7-disable-test-testmathlib-tostring.patch
This commit is contained in:
parent
84bdb32ee3
commit
9e60ef3b47
1
.gitignore
vendored
1
.gitignore
vendored
@ -48,3 +48,4 @@ cppcheck-1.44.tar.bz2
|
|||||||
/cppcheck-2.5.tar.gz
|
/cppcheck-2.5.tar.gz
|
||||||
/cppcheck-2.6.tar.gz
|
/cppcheck-2.6.tar.gz
|
||||||
/cppcheck-2.7.tar.gz
|
/cppcheck-2.7.tar.gz
|
||||||
|
/cppcheck-2.7.3.tar.gz
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
|
|
@ -1,80 +0,0 @@
|
|||||||
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
|
|
88
cppcheck-2.7.3-tinyxml2.patch
Normal file
88
cppcheck-2.7.3-tinyxml2.patch
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt
|
||||||
|
index 629354086..7ec2288fe 100644
|
||||||
|
--- a/cli/CMakeLists.txt
|
||||||
|
+++ b/cli/CMakeLists.txt
|
||||||
|
@@ -35,7 +35,7 @@ if (WIN32 AND NOT BORLAND)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
||||||
|
- target_link_libraries(cppcheck ${tinyxml2_LIBRARIES})
|
||||||
|
+ target_link_libraries(cppcheck tinyxml2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_dependencies(cppcheck copy_cfg)
|
||||||
|
diff --git a/cmake/printInfo.cmake b/cmake/printInfo.cmake
|
||||||
|
index 2fd971b1d..8bf497304 100644
|
||||||
|
--- a/cmake/printInfo.cmake
|
||||||
|
+++ b/cmake/printInfo.cmake
|
||||||
|
@@ -54,7 +54,7 @@ if (USE_Z3)
|
||||||
|
endif()
|
||||||
|
message( STATUS "USE_BUNDLED_TINYXML2 = ${USE_BUNDLED_TINYXML2}" )
|
||||||
|
if (NOT USE_BUNDLED_TINYXML2)
|
||||||
|
- message(STATUS "tinyxml2_LIBRARIES = ${tinyxml2_LIBRARIES}")
|
||||||
|
+ message(STATUS "tinyxml2_LIBRARIES = tinyxml2")
|
||||||
|
endif()
|
||||||
|
message( STATUS )
|
||||||
|
|
||||||
|
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
|
||||||
|
index 4f265f7fc..213ad5918 100644
|
||||||
|
--- a/gui/CMakeLists.txt
|
||||||
|
+++ b/gui/CMakeLists.txt
|
||||||
|
@@ -36,7 +36,7 @@ if (BUILD_GUI)
|
||||||
|
target_link_libraries(cppcheck-gui ${Z3_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
||||||
|
- target_link_libraries(cppcheck-gui ${tinyxml2_LIBRARIES})
|
||||||
|
+ target_link_libraries(cppcheck-gui tinyxml2)
|
||||||
|
endif()
|
||||||
|
target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Help)
|
||||||
|
if(WITH_QCHART)
|
||||||
|
diff --git a/gui/test/benchmark/simple/CMakeLists.txt b/gui/test/benchmark/simple/CMakeLists.txt
|
||||||
|
index c6c6cd672..81351e719 100644
|
||||||
|
--- a/gui/test/benchmark/simple/CMakeLists.txt
|
||||||
|
+++ b/gui/test/benchmark/simple/CMakeLists.txt
|
||||||
|
@@ -20,5 +20,5 @@ if (USE_Z3)
|
||||||
|
target_link_libraries(benchmark-simple ${Z3_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
||||||
|
- target_link_libraries(benchmark-simple ${tinyxml2_LIBRARIES})
|
||||||
|
+ target_link_libraries(benchmark-simple tinyxml2)
|
||||||
|
endif()
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/gui/test/xmlreportv2/CMakeLists.txt b/gui/test/xmlreportv2/CMakeLists.txt
|
||||||
|
index 97932d8e8..5dd39465c 100644
|
||||||
|
--- a/gui/test/xmlreportv2/CMakeLists.txt
|
||||||
|
+++ b/gui/test/xmlreportv2/CMakeLists.txt
|
||||||
|
@@ -24,5 +24,5 @@ if (USE_Z3)
|
||||||
|
target_link_libraries(test-xmlreportv2 ${Z3_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
||||||
|
- target_link_libraries(test-xmlreportv2 ${tinyxml2_LIBRARIES})
|
||||||
|
+ target_link_libraries(test-xmlreportv2 tinyxml2)
|
||||||
|
endif()
|
||||||
|
diff --git a/oss-fuzz/CMakeLists.txt b/oss-fuzz/CMakeLists.txt
|
||||||
|
index e3117b05a..5b2c5e059 100644
|
||||||
|
--- a/oss-fuzz/CMakeLists.txt
|
||||||
|
+++ b/oss-fuzz/CMakeLists.txt
|
||||||
|
@@ -25,7 +25,7 @@ if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
target_link_libraries(fuzz-client PRIVATE ${Z3_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
||||||
|
- target_link_libraries(fuzz-client PRIVATE ${tinyxml2_LIBRARIES})
|
||||||
|
+ target_link_libraries(fuzz-client PRIVATE tinyxml2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_executable(translate EXCLUDE_FROM_ALL
|
||||||
|
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
|
||||||
|
index 082ca253a..2cc49fe99 100644
|
||||||
|
--- a/test/CMakeLists.txt
|
||||||
|
+++ b/test/CMakeLists.txt
|
||||||
|
@@ -26,7 +26,7 @@ if (BUILD_TESTS)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
|
||||||
|
- target_link_libraries(testrunner ${tinyxml2_LIBRARIES})
|
||||||
|
+ target_link_libraries(testrunner tinyxml2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS)
|
@ -1,7 +1,7 @@
|
|||||||
%undefine __cmake_in_source_build
|
%undefine __cmake_in_source_build
|
||||||
|
|
||||||
Name: cppcheck
|
Name: cppcheck
|
||||||
Version: 2.7
|
Version: 2.7.3
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Tool for static C/C++ code analysis
|
Summary: Tool for static C/C++ code analysis
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -12,11 +12,9 @@ Source0: https://github.com/danmar/%{name}/archive/%{version}.tar.gz#/%{n
|
|||||||
Patch0: cppcheck-2.2-translations.patch
|
Patch0: cppcheck-2.2-translations.patch
|
||||||
# Select python3 explicitly
|
# Select python3 explicitly
|
||||||
Patch1: cppcheck-1.88-htmlreport-python3.patch
|
Patch1: cppcheck-1.88-htmlreport-python3.patch
|
||||||
# Disable one test, which fails under ppc64le
|
# Fix undefined reference to tinyxml2
|
||||||
# test/testmathlib.cpp:1246(TestMathLib::toString): Assertion failed.
|
# cmake/findDependencies.cmake: tinyxml2 is found by find_package(tinyxml2 QUIET)
|
||||||
Patch2: cppcheck-2.7-disable-test-testmathlib-tostring.patch
|
Patch2: cppcheck-2.7.3-tinyxml2.patch
|
||||||
# https://github.com/danmar/cppcheck/commit/974dd5d
|
|
||||||
Patch3: cppcheck-2.7-tinyxml2.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
@ -63,8 +61,7 @@ from xml files first generated using cppcheck.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .translations
|
%patch0 -p1 -b .translations
|
||||||
%patch1 -p1 -b .python3
|
%patch1 -p1 -b .python3
|
||||||
%patch2 -p1 -b .array7
|
%patch2 -p1 -b .tinyxml2
|
||||||
%patch3 -p1 -b .tinyxml2
|
|
||||||
# Make sure bundled tinyxml2 is not used
|
# Make sure bundled tinyxml2 is not used
|
||||||
rm -r externals/tinyxml2
|
rm -r externals/tinyxml2
|
||||||
# Generate the Qt online-help file
|
# Generate the Qt online-help file
|
||||||
@ -120,6 +117,9 @@ cd %{_vpath_builddir}/bin
|
|||||||
%{_bindir}/cppcheck-htmlreport
|
%{_bindir}/cppcheck-htmlreport
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Mar 19 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.7.3-1
|
||||||
|
- Update to 2.7.3.
|
||||||
|
|
||||||
* Tue Feb 08 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.7-1
|
* Tue Feb 08 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.7-1
|
||||||
- Update to 2.7.
|
- Update to 2.7.
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (cppcheck-2.7.tar.gz) = 22da64126ec76fa2b3c533fe4c82d8c3a46a274bce78aa2495bffed5491c604891ba46684499a28a4a22ab928979e9388e52df36ad0e2b001b81619c26791aad
|
SHA512 (cppcheck-2.7.3.tar.gz) = 419fe7af54499e3c086792d159f1e91dff7e91cb7a9555d42ce35262413e060e090200777ed387cbbbfd7731b44ad71f490e12b07c4d6050c2bd1ea8e226a71f
|
||||||
|
Loading…
Reference in New Issue
Block a user