|
|
2035cd2 |
diff -up cppcheck-2.1/cli/CMakeLists.txt.orig cppcheck-2.1/cli/CMakeLists.txt
|
|
|
2035cd2 |
--- cppcheck-2.1/cli/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200
|
|
|
2035cd2 |
+++ cppcheck-2.1/cli/CMakeLists.txt 2020-06-15 11:52:39.095165469 +0200
|
|
|
e13f8f2 |
@@ -1,5 +1,4 @@
|
|
|
2825eff |
include_directories(${PROJECT_SOURCE_DIR}/lib/)
|
|
|
2825eff |
-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
|
|
|
d836748 |
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
|
|
|
2825eff |
|
|
|
2825eff |
file(GLOB hdrs "*.h")
|
|
|
3d97d3e |
@@ -8,7 +7,7 @@ file(GLOB mainfile "main.cpp")
|
|
|
2825eff |
list(REMOVE_ITEM srcs ${mainfile})
|
|
|
2825eff |
|
|
|
2825eff |
add_library(cli_objs OBJECT ${hdrs} ${srcs})
|
|
|
d836748 |
-add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
d836748 |
+add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
2825eff |
if (HAVE_RULES)
|
|
|
3d97d3e |
target_link_libraries(cppcheck ${PCRE_LIBRARY})
|
|
|
2035cd2 |
endif()
|
|
|
3d97d3e |
@@ -18,6 +17,7 @@ endif()
|
|
|
9d1bd55 |
if (WIN32 AND NOT BORLAND)
|
|
|
d4f19b3 |
target_link_libraries(cppcheck Shlwapi.lib)
|
|
|
d4f19b3 |
endif()
|
|
|
d836748 |
+target_link_libraries(cppcheck tinyxml2)
|
|
|
2825eff |
|
|
|
2825eff |
install(TARGETS cppcheck
|
|
|
2825eff |
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
|
|
|
2035cd2 |
diff -up cppcheck-2.1/CMakeLists.txt.orig cppcheck-2.1/CMakeLists.txt
|
|
|
2035cd2 |
--- cppcheck-2.1/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200
|
|
|
2035cd2 |
+++ cppcheck-2.1/CMakeLists.txt 2020-06-15 11:52:39.099165304 +0200
|
|
|
2035cd2 |
@@ -23,7 +23,6 @@ if (BUILD_TESTS)
|
|
|
2825eff |
enable_testing()
|
|
|
2825eff |
endif()
|
|
|
2825eff |
|
|
|
2825eff |
-add_subdirectory(externals/tinyxml)
|
|
|
d836748 |
add_subdirectory(externals/simplecpp)
|
|
|
2825eff |
add_subdirectory(lib) # CppCheck Library
|
|
|
2825eff |
add_subdirectory(cli) # Client application
|
|
|
2035cd2 |
diff -up cppcheck-2.1/gui/CMakeLists.txt.orig cppcheck-2.1/gui/CMakeLists.txt
|
|
|
2035cd2 |
--- cppcheck-2.1/gui/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200
|
|
|
2035cd2 |
+++ cppcheck-2.1/gui/CMakeLists.txt 2020-06-15 11:53:24.866217469 +0200
|
|
|
3d97d3e |
@@ -10,7 +10,6 @@ if (BUILD_GUI)
|
|
|
f8cc68f |
endif()
|
|
|
f8cc68f |
|
|
|
f8cc68f |
include_directories(${PROJECT_SOURCE_DIR}/lib/)
|
|
|
f8cc68f |
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
|
|
|
f8cc68f |
|
|
|
f8cc68f |
file(GLOB hdrs "*.h")
|
|
|
f8cc68f |
file(GLOB srcs "*.cpp")
|
|
|
2035cd2 |
@@ -20,14 +19,14 @@ if (BUILD_GUI)
|
|
|
f8cc68f |
QT5_ADD_RESOURCES(resources "gui.qrc")
|
|
|
f8cc68f |
QT5_ADD_TRANSLATION(qms ${tss})
|
|
|
f8cc68f |
|
|
|
f8cc68f |
- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
f8cc68f |
+ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
f8cc68f |
if (HAVE_RULES)
|
|
|
2035cd2 |
target_link_libraries(cppcheck-gui ${PCRE_LIBRARY})
|
|
|
2035cd2 |
endif()
|
|
|
2035cd2 |
if (USE_Z3)
|
|
|
2035cd2 |
target_link_libraries(cppcheck-gui ${Z3_LIBRARIES})
|
|
|
f8cc68f |
endif()
|
|
|
e13f8f2 |
- target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
|
|
|
e13f8f2 |
+ target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
|
|
|
bd7178b |
if(WITH_QCHART)
|
|
|
bd7178b |
target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART )
|
|
|
bd7178b |
target_link_libraries(cppcheck-gui Qt5::Charts)
|
|
|
2035cd2 |
diff -up cppcheck-2.1/test/CMakeLists.txt.orig cppcheck-2.1/test/CMakeLists.txt
|
|
|
2035cd2 |
--- cppcheck-2.1/test/CMakeLists.txt.orig 2020-06-15 11:52:39.108164933 +0200
|
|
|
2035cd2 |
+++ cppcheck-2.1/test/CMakeLists.txt 2020-06-15 11:54:10.167286593 +0200
|
|
|
2035cd2 |
@@ -13,19 +13,19 @@ if (BUILD_TESTS)
|
|
|
613ef46 |
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -j ${CTEST_PARALLEL_LEVEL} -C ${CMAKE_CFG_INTDIR} --timeout 90)
|
|
|
2825eff |
|
|
|
2825eff |
include_directories(${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/cli/)
|
|
|
2825eff |
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml)
|
|
|
d836748 |
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
|
|
|
2825eff |
|
|
|
2825eff |
file(GLOB hdrs "*.h")
|
|
|
2825eff |
file(GLOB srcs "*.cpp")
|
|
|
2825eff |
|
|
|
d836748 |
- add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
d836748 |
+ add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
2825eff |
if (HAVE_RULES)
|
|
|
2035cd2 |
target_link_libraries(testrunner ${PCRE_LIBRARY})
|
|
|
2035cd2 |
endif()
|
|
|
2035cd2 |
if (USE_Z3)
|
|
|
2035cd2 |
target_link_libraries(testrunner ${Z3_LIBRARIES})
|
|
|
2825eff |
endif()
|
|
|
d836748 |
+ target_link_libraries(testrunner tinyxml2)
|
|
|
d836748 |
|
|
|
d836748 |
add_custom_target(copy_cfg ALL
|
|
|
d836748 |
COMMENT "Copying cfg files")
|