diff --git a/tools/donate-cpu.py b/tools/donate-cpu.py index 4152cbfeb..88e4aa501 100644 --- a/tools/donate-cpu.py +++ b/tools/donate-cpu.py @@ -37,7 +37,7 @@ import platform # Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/ # Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic # changes) -CLIENT_VERSION = "1.1.3" +CLIENT_VERSION = "1.1.4" def checkRequirements(): @@ -228,22 +228,19 @@ def scanPackage(workPath, cppcheckPath, jobs, fast): print('Analyze..') os.chdir(workPath) libraries = ' --library=posix --library=gnu' - if hasInclude('temp', ['', '', '']): - libraries += ' --library=python' - if hasInclude('temp', ['', '', '', '', '']): - libraries += ' --library=zlib' - if os.path.exists(cppcheckPath + '/cfg/boost.cfg') and hasInclude('temp', ['']): - libraries += ' --library=sdl' + + libraryIncludes = {'boost': ['', '', ''], + 'qt': ['', '', '', '', ''], + 'wxwidgets': [''], + } + for library, includes in libraryIncludes.items(): + if os.path.exists(os.path.join(cppcheckPath, 'cfg', library + '.cfg')) and hasInclude('temp', includes): + libraries += ' --library=' + library # Reference for GNU C: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html options = jobs + libraries + ' -D__GNUC__ --check-library --inconclusive --enable=style,information --platform=unix64 --template=daca2 -rp=temp temp'