cppcheck/cppcheck-2.1-tinyxml.patch

91 lines
4.3 KiB
Diff
Raw Normal View History

2020-06-15 09:54:59 +00:00
diff -up cppcheck-2.1/cli/CMakeLists.txt.orig cppcheck-2.1/cli/CMakeLists.txt
--- cppcheck-2.1/cli/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200
+++ cppcheck-2.1/cli/CMakeLists.txt 2020-06-15 11:52:39.095165469 +0200
2018-09-11 16:19:41 +00:00
@@ -1,5 +1,4 @@
2016-04-10 01:30:21 +00:00
include_directories(${PROJECT_SOURCE_DIR}/lib/)
-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
2016-08-09 06:16:33 +00:00
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
2016-04-10 01:30:21 +00:00
file(GLOB hdrs "*.h")
2019-02-09 18:38:27 +00:00
@@ -8,7 +7,7 @@ file(GLOB mainfile "main.cpp")
2016-04-10 01:30:21 +00:00
list(REMOVE_ITEM srcs ${mainfile})
add_library(cli_objs OBJECT ${hdrs} ${srcs})
2016-08-09 06:16:33 +00:00
-add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
+add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
2016-04-10 01:30:21 +00:00
if (HAVE_RULES)
2019-02-09 18:38:27 +00:00
target_link_libraries(cppcheck ${PCRE_LIBRARY})
2020-06-15 09:54:59 +00:00
endif()
2019-02-09 18:38:27 +00:00
@@ -18,6 +17,7 @@ endif()
2018-11-08 15:08:01 +00:00
if (WIN32 AND NOT BORLAND)
2018-04-14 14:49:48 +00:00
target_link_libraries(cppcheck Shlwapi.lib)
endif()
2016-08-09 06:16:33 +00:00
+target_link_libraries(cppcheck tinyxml2)
2016-04-10 01:30:21 +00:00
install(TARGETS cppcheck
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
2020-06-15 09:54:59 +00:00
diff -up cppcheck-2.1/CMakeLists.txt.orig cppcheck-2.1/CMakeLists.txt
--- cppcheck-2.1/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200
+++ cppcheck-2.1/CMakeLists.txt 2020-06-15 11:52:39.099165304 +0200
@@ -23,7 +23,6 @@ if (BUILD_TESTS)
2016-04-10 01:30:21 +00:00
enable_testing()
endif()
-add_subdirectory(externals/tinyxml)
2016-08-09 06:16:33 +00:00
add_subdirectory(externals/simplecpp)
2016-04-10 01:30:21 +00:00
add_subdirectory(lib) # CppCheck Library
add_subdirectory(cli) # Client application
2020-06-15 09:54:59 +00:00
diff -up cppcheck-2.1/gui/CMakeLists.txt.orig cppcheck-2.1/gui/CMakeLists.txt
--- cppcheck-2.1/gui/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200
+++ cppcheck-2.1/gui/CMakeLists.txt 2020-06-15 11:53:24.866217469 +0200
2019-02-09 18:38:27 +00:00
@@ -10,7 +10,6 @@ if (BUILD_GUI)
2017-10-18 14:44:12 +00:00
endif()
include_directories(${PROJECT_SOURCE_DIR}/lib/)
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")
2020-06-15 09:54:59 +00:00
@@ -20,14 +19,14 @@ if (BUILD_GUI)
2017-10-18 14:44:12 +00:00
QT5_ADD_RESOURCES(resources "gui.qrc")
QT5_ADD_TRANSLATION(qms ${tss})
- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
+ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
if (HAVE_RULES)
2020-06-15 09:54:59 +00:00
target_link_libraries(cppcheck-gui ${PCRE_LIBRARY})
endif()
if (USE_Z3)
target_link_libraries(cppcheck-gui ${Z3_LIBRARIES})
2017-10-18 14:44:12 +00:00
endif()
2018-09-11 16:19:41 +00:00
- target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
+ target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
2019-07-02 00:58:26 +00:00
if(WITH_QCHART)
target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART )
target_link_libraries(cppcheck-gui Qt5::Charts)
2020-06-15 09:54:59 +00:00
diff -up cppcheck-2.1/test/CMakeLists.txt.orig cppcheck-2.1/test/CMakeLists.txt
--- cppcheck-2.1/test/CMakeLists.txt.orig 2020-06-15 11:52:39.108164933 +0200
+++ cppcheck-2.1/test/CMakeLists.txt 2020-06-15 11:54:10.167286593 +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)
2016-04-10 01:30:21 +00:00
include_directories(${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/cli/)
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml)
2016-08-09 06:16:33 +00:00
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
2016-04-10 01:30:21 +00:00
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")
2016-08-09 06:16:33 +00:00
- add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
+ add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:simplecpp_objs>)
2016-04-10 01:30:21 +00:00
if (HAVE_RULES)
2020-06-15 09:54:59 +00:00
target_link_libraries(testrunner ${PCRE_LIBRARY})
endif()
if (USE_Z3)
target_link_libraries(testrunner ${Z3_LIBRARIES})
2016-04-10 01:30:21 +00:00
endif()
2016-08-09 06:16:33 +00:00
+ target_link_libraries(testrunner tinyxml2)
add_custom_target(copy_cfg ALL
COMMENT "Copying cfg files")