-
Notifications
You must be signed in to change notification settings - Fork 1.6k
selfcheck.yml: also run unusedFunction selfcheck without CLI (currently disabled) and GUI sources
#6526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
selfcheck.yml: also run unusedFunction selfcheck without CLI (currently disabled) and GUI sources
#6526
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
488cdca
selfcheck.yml: fixed typo
firewave 52ccac1
added CMake option `BUILD_CLI` to control inclusion of CLI targets
firewave dcf20ba
selfcheck.yml: also run `unusedFunction` selfcheck without CLI (curre…
firewave cd3ceff
mitigated `unusedFunction` nogui selfcheck warnings
firewave bdd72ea
testcmdlineparser.cpp: fixed `unusedFunction` selfcheck warning
firewave File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,86 +1,89 @@ | ||
| file(GLOB hdrs "*.h") | ||
| file(GLOB srcs "*.cpp") | ||
| file(GLOB mainfile "main.cpp") | ||
| list(REMOVE_ITEM srcs ${mainfile}) | ||
| if (BUILD_CLI) | ||
|
|
||
| add_library(cli_objs OBJECT ${hdrs} ${srcs}) | ||
| target_include_directories(cli_objs PRIVATE ${PROJECT_SOURCE_DIR}/lib/) | ||
| if(USE_BUNDLED_TINYXML2) | ||
| target_externals_include_directories(cli_objs PRIVATE ${PROJECT_SOURCE_DIR}/externals/tinyxml2/) | ||
| else() | ||
| target_include_directories(cli_objs SYSTEM PRIVATE ${tinyxml2_INCLUDE_DIRS}) | ||
| endif() | ||
| target_externals_include_directories(cli_objs PRIVATE ${PROJECT_SOURCE_DIR}/externals/simplecpp/) | ||
| if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS) | ||
| target_precompile_headers(cli_objs PRIVATE precompiled.h) | ||
| endif() | ||
| if (BUILD_CORE_DLL) | ||
| target_compile_definitions(cli_objs PRIVATE CPPCHECKLIB_IMPORT TINYXML2_IMPORT) | ||
| endif() | ||
| file(GLOB hdrs "*.h") | ||
| file(GLOB srcs "*.cpp") | ||
| file(GLOB mainfile "main.cpp") | ||
| list(REMOVE_ITEM srcs ${mainfile}) | ||
|
|
||
| if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 13) | ||
| # false positive warning in Clang 13 - caused by FD_ZERO macro | ||
| set_source_files_properties(processexecutor.cpp PROPERTIES COMPILE_FLAGS -Wno-reserved-identifier) | ||
| endif() | ||
|
|
||
| list(APPEND cppcheck_SOURCES ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs>) | ||
| if (NOT BUILD_CORE_DLL) | ||
| list(APPEND cppcheck_SOURCES $<TARGET_OBJECTS:cppcheck-core>) | ||
| list(APPEND cppcheck_SOURCES $<TARGET_OBJECTS:simplecpp_objs>) | ||
| add_library(cli_objs OBJECT ${hdrs} ${srcs}) | ||
| target_include_directories(cli_objs PRIVATE ${PROJECT_SOURCE_DIR}/lib/) | ||
| if(USE_BUNDLED_TINYXML2) | ||
| list(APPEND cppcheck_SOURCES $<TARGET_OBJECTS:tinyxml2_objs>) | ||
| target_externals_include_directories(cli_objs PRIVATE ${PROJECT_SOURCE_DIR}/externals/tinyxml2/) | ||
| else() | ||
| target_include_directories(cli_objs SYSTEM PRIVATE ${tinyxml2_INCLUDE_DIRS}) | ||
| endif() | ||
| target_externals_include_directories(cli_objs PRIVATE ${PROJECT_SOURCE_DIR}/externals/simplecpp/) | ||
| if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS) | ||
| target_precompile_headers(cli_objs PRIVATE precompiled.h) | ||
| endif() | ||
| if (BUILD_CORE_DLL) | ||
| target_compile_definitions(cli_objs PRIVATE CPPCHECKLIB_IMPORT TINYXML2_IMPORT) | ||
| endif() | ||
| endif() | ||
| if (WIN32) | ||
| list(APPEND cppcheck_SOURCES version.rc) | ||
| endif() | ||
|
|
||
| add_executable(cppcheck ${cppcheck_SOURCES}) | ||
| target_include_directories(cppcheck PRIVATE ${PROJECT_SOURCE_DIR}/lib/) | ||
| if(USE_BUNDLED_TINYXML2) | ||
| target_externals_include_directories(cppcheck PRIVATE ${PROJECT_SOURCE_DIR}/externals/tinyxml2/) | ||
| else() | ||
| target_include_directories(cppcheck SYSTEM PRIVATE ${tinyxml2_INCLUDE_DIRS}) | ||
| endif() | ||
| target_externals_include_directories(cppcheck PRIVATE ${PROJECT_SOURCE_DIR}/externals/simplecpp/) | ||
| if (HAVE_RULES) | ||
| target_link_libraries(cppcheck ${PCRE_LIBRARY}) | ||
| endif() | ||
| if (WIN32 AND NOT BORLAND) | ||
| if(NOT MINGW) | ||
| target_link_libraries(cppcheck Shlwapi.lib) | ||
| if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 13) | ||
| # false positive warning in Clang 13 - caused by FD_ZERO macro | ||
| set_source_files_properties(processexecutor.cpp PROPERTIES COMPILE_FLAGS -Wno-reserved-identifier) | ||
| endif() | ||
|
|
||
| list(APPEND cppcheck_SOURCES ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs>) | ||
| if (NOT BUILD_CORE_DLL) | ||
| list(APPEND cppcheck_SOURCES $<TARGET_OBJECTS:cppcheck-core>) | ||
| list(APPEND cppcheck_SOURCES $<TARGET_OBJECTS:simplecpp_objs>) | ||
| if(USE_BUNDLED_TINYXML2) | ||
| list(APPEND cppcheck_SOURCES $<TARGET_OBJECTS:tinyxml2_objs>) | ||
| endif() | ||
| endif() | ||
| if (WIN32) | ||
| list(APPEND cppcheck_SOURCES version.rc) | ||
| endif() | ||
|
|
||
| add_executable(cppcheck ${cppcheck_SOURCES}) | ||
| target_include_directories(cppcheck PRIVATE ${PROJECT_SOURCE_DIR}/lib/) | ||
| if(USE_BUNDLED_TINYXML2) | ||
| target_externals_include_directories(cppcheck PRIVATE ${PROJECT_SOURCE_DIR}/externals/tinyxml2/) | ||
| else() | ||
| target_link_libraries(cppcheck shlwapi) | ||
| target_include_directories(cppcheck SYSTEM PRIVATE ${tinyxml2_INCLUDE_DIRS}) | ||
| endif() | ||
| target_externals_include_directories(cppcheck PRIVATE ${PROJECT_SOURCE_DIR}/externals/simplecpp/) | ||
| if (HAVE_RULES) | ||
| target_link_libraries(cppcheck ${PCRE_LIBRARY}) | ||
| endif() | ||
| if (WIN32 AND NOT BORLAND) | ||
| if(NOT MINGW) | ||
| target_link_libraries(cppcheck Shlwapi.lib) | ||
| else() | ||
| target_link_libraries(cppcheck shlwapi) | ||
| endif() | ||
| endif() | ||
| if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) | ||
| target_link_libraries(cppcheck ${tinyxml2_LIBRARIES}) | ||
| endif() | ||
| target_link_libraries(cppcheck ${CMAKE_THREAD_LIBS_INIT}) | ||
| if (BUILD_CORE_DLL) | ||
| target_link_libraries(cppcheck cppcheck-core) | ||
| endif() | ||
| endif() | ||
| if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) | ||
| target_link_libraries(cppcheck ${tinyxml2_LIBRARIES}) | ||
| endif() | ||
| target_link_libraries(cppcheck ${CMAKE_THREAD_LIBS_INIT}) | ||
| if (BUILD_CORE_DLL) | ||
| target_link_libraries(cppcheck cppcheck-core) | ||
| endif() | ||
|
|
||
| add_dependencies(cppcheck copy_cfg) | ||
| add_dependencies(cppcheck copy_addons) | ||
| add_dependencies(cppcheck copy_platforms) | ||
| if (NOT DISABLE_DMAKE) | ||
| add_dependencies(cppcheck run-dmake) | ||
| endif() | ||
| add_dependencies(cppcheck copy_cfg) | ||
| add_dependencies(cppcheck copy_addons) | ||
| add_dependencies(cppcheck copy_platforms) | ||
| if (NOT DISABLE_DMAKE) | ||
| add_dependencies(cppcheck run-dmake) | ||
| endif() | ||
|
|
||
| install(TARGETS cppcheck | ||
| RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} | ||
| COMPONENT applications) | ||
| install(TARGETS cppcheck | ||
| RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} | ||
| COMPONENT applications) | ||
|
|
||
| install(FILES ${addons} | ||
| DESTINATION ${FILESDIR}/addons | ||
| COMPONENT headers) | ||
| install(FILES ${addons} | ||
| DESTINATION ${FILESDIR}/addons | ||
| COMPONENT headers) | ||
|
|
||
| install(FILES ${cfgs} | ||
| DESTINATION ${FILESDIR}/cfg | ||
| COMPONENT headers) | ||
| install(FILES ${cfgs} | ||
| DESTINATION ${FILESDIR}/cfg | ||
| COMPONENT headers) | ||
|
|
||
| install(FILES ${platforms} | ||
| DESTINATION ${FILESDIR}/platforms | ||
| COMPONENT headers) | ||
| install(FILES ${platforms} | ||
| DESTINATION ${FILESDIR}/platforms | ||
| COMPONENT headers) | ||
|
|
||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -268,6 +268,7 @@ class TestCmdlineParser : public TestFixture { | |
| TEST_CASE(xmlverinvalid); | ||
| TEST_CASE(doc); | ||
| TEST_CASE(docExclusive); | ||
| TEST_CASE(showtimeSummary); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was uncovered by the still disabled selfcheck with all sources enabled. |
||
| TEST_CASE(showtimeFile); | ||
| TEST_CASE(showtimeFileTotal); | ||
| TEST_CASE(showtimeTop5); | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this was never used since its introduction in bd8fb0a.