Simplify cppcheck-2.7.3-tinyxml2.patch
This commit is contained in:
parent
9e60ef3b47
commit
ef547dcd11
@ -1,88 +1,15 @@
|
|||||||
diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt
|
diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake
|
||||||
index 629354086..7ec2288fe 100644
|
index 4d5b9efc5..6f6d9210c 100644
|
||||||
--- a/cli/CMakeLists.txt
|
--- a/cmake/findDependencies.cmake
|
||||||
+++ b/cli/CMakeLists.txt
|
+++ b/cmake/findDependencies.cmake
|
||||||
@@ -35,7 +35,7 @@ if (WIN32 AND NOT BORLAND)
|
@@ -48,7 +48,9 @@ endif()
|
||||||
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)
|
if (NOT USE_BUNDLED_TINYXML2)
|
||||||
- message(STATUS "tinyxml2_LIBRARIES = ${tinyxml2_LIBRARIES}")
|
find_package(tinyxml2 QUIET)
|
||||||
+ message(STATUS "tinyxml2_LIBRARIES = tinyxml2")
|
- if (NOT tinyxml2_FOUND)
|
||||||
endif()
|
+ if (tinyxml2_FOUND)
|
||||||
message( STATUS )
|
+ set(tinyxml2_LIBRARIES "tinyxml2")
|
||||||
|
+ else()
|
||||||
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
|
find_library(tinyxml2_LIBRARIES tinyxml2)
|
||||||
index 4f265f7fc..213ad5918 100644
|
if (NOT tinyxml2_LIBRARIES)
|
||||||
--- a/gui/CMakeLists.txt
|
message(FATAL_ERROR "tinyxml2 has not been found")
|
||||||
+++ 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)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user