donate-cpu.py: Enable "python" and "boost" library detection

Only enable the library option for those configurations if the
corresponding .cfg file exists to not crash Cppcheck if an
older version than 1.87 is used as the "old" version.
This commit is contained in:
versat 2019-02-09 18:09:16 +01:00
parent 1ddaa1ecf3
commit bdfc20a482
1 changed files with 5 additions and 7 deletions

View File

@ -37,7 +37,7 @@ import platform
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/ # 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 # Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
# changes) # changes)
CLIENT_VERSION = "1.0.0" CLIENT_VERSION = "1.1.0"
def checkRequirements(): def checkRequirements():
@ -232,18 +232,16 @@ def scanPackage(workPath, cppcheckPath, jobs):
libraries += ' --library=gtk' libraries += ' --library=gtk'
if hasInclude('temp', ['<X11/', '<Xm/']): if hasInclude('temp', ['<X11/', '<Xm/']):
libraries += ' --library=motif' libraries += ' --library=motif'
# TODO: enable after release 1.87 if os.path.exists(cppcheckPath + '/cfg/python.cfg') and hasInclude('temp', ['<Python.h>']):
# if hasInclude('temp', ['<Python.h>']): libraries += ' --library=python'
# libraries += ' --library=python'
if hasInclude('temp', ['<QString>', '<QtWidgets>', '<QtGui/']): if hasInclude('temp', ['<QString>', '<QtWidgets>', '<QtGui/']):
libraries += ' --library=qt' libraries += ' --library=qt'
if hasInclude('temp', ['<wx/', '"wx/']): if hasInclude('temp', ['<wx/', '"wx/']):
libraries += ' --library=wxwidgets' libraries += ' --library=wxwidgets'
if hasInclude('temp', ['<zlib.h>']): if hasInclude('temp', ['<zlib.h>']):
libraries += ' --library=zlib' libraries += ' --library=zlib'
# TODO: enable boost library configuration detection after release of Cppcheck 1.87 if os.path.exists(cppcheckPath + '/cfg/boost.cfg') and hasInclude('temp', ['<boost/']):
# if os.path.exists(cppcheckPath + '/cfg/boost.cfg') and hasInclude('temp', ['<boost/']): libraries += ' --library=boost'
# libraries += ' --library=boost'
if hasInclude('temp', ['<SDL.h>']): if hasInclude('temp', ['<SDL.h>']):
libraries += ' --library=sdl' libraries += ' --library=sdl'