2018-11-08 15:08:01 +00:00
|
|
|
diff -ur cppcheck-1.85.orig/cli/CMakeLists.txt cppcheck-1.85/cli/CMakeLists.txt
|
|
|
|
--- cppcheck-1.85.orig/cli/CMakeLists.txt 2018-10-14 14:56:51.000000000 +0200
|
|
|
|
+++ cppcheck-1.85/cli/CMakeLists.txt 2018-11-08 15:31:17.285998825 +0100
|
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")
|
2018-09-11 16:19:41 +00:00
|
|
|
@@ -8,13 +7,14 @@
|
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)
|
|
|
|
target_link_libraries(cppcheck pcre)
|
|
|
|
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}
|
2018-11-08 15:08:01 +00:00
|
|
|
diff -ur cppcheck-1.85.orig/CMakeLists.txt cppcheck-1.85/CMakeLists.txt
|
|
|
|
--- cppcheck-1.85.orig/CMakeLists.txt 2018-10-14 14:56:51.000000000 +0200
|
|
|
|
+++ cppcheck-1.85/CMakeLists.txt 2018-11-08 15:28:12.574001686 +0100
|
2018-09-11 16:19:41 +00:00
|
|
|
@@ -16,7 +16,6 @@
|
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
|
2018-11-08 15:08:01 +00:00
|
|
|
diff -ur cppcheck-1.85.orig/gui/CMakeLists.txt cppcheck-1.85/gui/CMakeLists.txt
|
|
|
|
--- cppcheck-1.85.orig/gui/CMakeLists.txt 2018-10-14 14:56:51.000000000 +0200
|
|
|
|
+++ cppcheck-1.85/gui/CMakeLists.txt 2018-11-08 15:28:12.575001686 +0100
|
2018-09-11 16:19:41 +00:00
|
|
|
@@ -10,7 +10,6 @@
|
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")
|
2018-09-11 16:19:41 +00:00
|
|
|
@@ -20,11 +19,11 @@
|
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)
|
|
|
|
target_link_libraries(cppcheck-gui pcre)
|
|
|
|
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)
|
2017-10-18 14:44:12 +00:00
|
|
|
|
|
|
|
install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
|
2018-09-11 16:19:41 +00:00
|
|
|
install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
|
2018-11-08 15:08:01 +00:00
|
|
|
diff -ur cppcheck-1.85.orig/test/CMakeLists.txt cppcheck-1.85/test/CMakeLists.txt
|
|
|
|
--- cppcheck-1.85.orig/test/CMakeLists.txt 2018-10-14 14:56:51.000000000 +0200
|
|
|
|
+++ cppcheck-1.85/test/CMakeLists.txt 2018-11-08 15:28:12.575001686 +0100
|
2018-09-11 16:19:41 +00:00
|
|
|
@@ -1,16 +1,16 @@
|
2016-04-10 01:30:21 +00:00
|
|
|
if (BUILD_TESTS)
|
|
|
|
|
|
|
|
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)
|
|
|
|
target_link_libraries(testrunner pcre)
|
|
|
|
endif()
|
2016-08-09 06:16:33 +00:00
|
|
|
+ target_link_libraries(testrunner tinyxml2)
|
|
|
|
|
|
|
|
add_custom_target(copy_cfg ALL
|
|
|
|
COMMENT "Copying cfg files")
|