From 101b1968f36d2e3ee88d44439fb70d0d8bb34274 Mon Sep 17 00:00:00 2001 From: 4fury-c3440d8 Date: Sun, 20 Dec 2020 07:15:03 +0000 Subject: [PATCH] cppcheck. --- programming/tool/cppcheck/actions.py | 3 +- .../cppcheck/files/use_system_tinyxml.patch | 90 ------------------- programming/tool/cppcheck/pspec.xml | 12 ++- 3 files changed, 11 insertions(+), 94 deletions(-) delete mode 100644 programming/tool/cppcheck/files/use_system_tinyxml.patch diff --git a/programming/tool/cppcheck/actions.py b/programming/tool/cppcheck/actions.py index 87b9a660b2..4fa0f4a016 100644 --- a/programming/tool/cppcheck/actions.py +++ b/programming/tool/cppcheck/actions.py @@ -15,7 +15,8 @@ j = "-DUSE_Z3=ON \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_TESTS=OFF \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_DISABLE_PRECOMPILE_HEADERS=OFF \ + -DUSE_BUNDLED_TINYXML2=OFF \ + -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \ -DENABLE_CHECK_INTERNAL=ON \ -DWITH_QCHART=ON -L \ " diff --git a/programming/tool/cppcheck/files/use_system_tinyxml.patch b/programming/tool/cppcheck/files/use_system_tinyxml.patch deleted file mode 100644 index 9a92c215e4..0000000000 --- a/programming/tool/cppcheck/files/use_system_tinyxml.patch +++ /dev/null @@ -1,90 +0,0 @@ -diff -up cppcheck-2.2/cli/CMakeLists.txt.orig cppcheck-2.2/cli/CMakeLists.txt ---- cppcheck-2.2/cli/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200 -+++ cppcheck-2.2/cli/CMakeLists.txt 2020-10-04 06:47:29.867450500 +0200 -@@ -1,5 +1,4 @@ - include_directories(${PROJECT_SOURCE_DIR}/lib/) --include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/) - include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/) - - file(GLOB hdrs "*.h") -@@ -8,7 +7,7 @@ file(GLOB mainfile "main.cpp") - list(REMOVE_ITEM srcs ${mainfile}) - - add_library(cli_objs OBJECT ${hdrs} ${srcs}) --add_executable(cppcheck ${hdrs} ${mainfile} $ $ $ $) -+add_executable(cppcheck ${hdrs} ${mainfile} $ $ $) - if (HAVE_RULES) - target_link_libraries(cppcheck ${PCRE_LIBRARY}) - endif() -@@ -18,6 +17,7 @@ endif() - if (WIN32 AND NOT BORLAND) - target_link_libraries(cppcheck Shlwapi.lib) - endif() -+target_link_libraries(cppcheck tinyxml2) - - install(TARGETS cppcheck - RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} -diff -up cppcheck-2.2/CMakeLists.txt.orig cppcheck-2.2/CMakeLists.txt ---- cppcheck-2.2/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200 -+++ cppcheck-2.2/CMakeLists.txt 2020-10-04 06:48:18.324566600 +0200 -@@ -23,7 +23,6 @@ if (BUILD_TESTS) - enable_testing() - endif() - --add_subdirectory(externals/tinyxml) - add_subdirectory(externals/simplecpp) - add_subdirectory(lib) # CppCheck Library - add_subdirectory(cli) # Client application -diff -up cppcheck-2.2/gui/CMakeLists.txt.orig cppcheck-2.2/gui/CMakeLists.txt ---- cppcheck-2.2/gui/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200 -+++ cppcheck-2.2/gui/CMakeLists.txt 2020-10-04 07:36:13.199769100 +0200 -@@ -10,7 +10,6 @@ if (BUILD_GUI) - endif() - - include_directories(${PROJECT_SOURCE_DIR}/lib/) -- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/) - - file(GLOB hdrs "*.h") - file(GLOB srcs "*.cpp") -@@ -20,14 +19,14 @@ if (BUILD_GUI) - QT5_ADD_RESOURCES(resources "gui.qrc") - QT5_ADD_TRANSLATION(qms ${tss}) - -- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $ $) -+ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $) - if (HAVE_RULES) - target_link_libraries(cppcheck-gui ${PCRE_LIBRARY}) - endif() - if (USE_Z3) - target_link_libraries(cppcheck-gui ${Z3_LIBRARIES}) - endif() -- target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Help) -+ target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Help) - if(WITH_QCHART) - target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART ) - target_link_libraries(cppcheck-gui Qt5::Charts) -diff -up cppcheck-2.2/test/CMakeLists.txt.orig cppcheck-2.2/test/CMakeLists.txt ---- cppcheck-2.2/test/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200 -+++ cppcheck-2.2/test/CMakeLists.txt 2020-10-04 06:55:33.660775300 +0200 -@@ -13,19 +13,19 @@ if (BUILD_TESTS) - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -j ${CTEST_PARALLEL_LEVEL} -C ${CMAKE_CFG_INTDIR} --timeout 90) - - include_directories(${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/cli/) -- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml) - include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/) - - file(GLOB hdrs "*.h") - file(GLOB srcs "*.cpp") - -- add_executable(testrunner ${hdrs} ${srcs} $ $ $ $) -+ add_executable(testrunner ${hdrs} ${srcs} $ $ $) - if (HAVE_RULES) - target_link_libraries(testrunner ${PCRE_LIBRARY}) - endif() - if (USE_Z3) - target_link_libraries(testrunner ${Z3_LIBRARIES}) - endif() -+ target_link_libraries(testrunner tinyxml2) - - if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS) - target_precompile_headers(testrunner PRIVATE precompiled.h) diff --git a/programming/tool/cppcheck/pspec.xml b/programming/tool/cppcheck/pspec.xml index 5c6b79e55b..28f5c0ccdf 100644 --- a/programming/tool/cppcheck/pspec.xml +++ b/programming/tool/cppcheck/pspec.xml @@ -16,8 +16,8 @@ Cppcheck is a static analysis tool for C/C++ code. It provides unique code analysis to detect bugs and focuses on detecting undefined behaviour and dangerous coding constructs. The goal is to detect only real errors in the code (i.e. have very few false positives). - - https://sourceforge.net/projects/cppcheck/files/cppcheck/2.2/cppcheck-2.2.tar.bz2 + + mirrors://sourceforge/cppcheck/cppcheck-2.3.tar.bz2 cmake @@ -41,7 +41,6 @@ htmlreport_py3.patch qm_install_path.patch - use_system_tinyxml.patch @@ -69,6 +68,13 @@ + + 2020-12-20 + 2.3 + Ver. bump + fury + wascheme@tuta.io + 2020-10-06 2.2