Added top-level 'check' target.
Also refactored all. pro files by the way. :)
This commit is contained in:
parent
e48664a3c9
commit
d9d2f53df6
|
@ -26,7 +26,6 @@ gui/gui.vcproj
|
||||||
gui/gui
|
gui/gui
|
||||||
gui/qrc_gui.cpp
|
gui/qrc_gui.cpp
|
||||||
gui/*.qm
|
gui/*.qm
|
||||||
gui/ui_*.h
|
|
||||||
# Doxygen output folder
|
# Doxygen output folder
|
||||||
doxyoutput/
|
doxyoutput/
|
||||||
# qmake generated
|
# qmake generated
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
TEMPLATE = subdirs
|
||||||
|
SUBDIRS = src test gui
|
||||||
|
CONFIG += ordered
|
||||||
|
|
||||||
|
# check target - build and run tests
|
||||||
|
check.depends = sub-test
|
||||||
|
check.commands = $$PWD/test/test
|
||||||
|
QMAKE_EXTRA_TARGETS += check
|
127
gui/gui.pro
127
gui/gui.pro
|
@ -1,7 +1,3 @@
|
||||||
######################################################################
|
|
||||||
# Automatically generated by qmake (2.01a) Sun Feb 22 10:14:18 2009
|
|
||||||
######################################################################
|
|
||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET =
|
TARGET =
|
||||||
QT += xml
|
QT += xml
|
||||||
|
@ -10,6 +6,7 @@ INCLUDEPATH += .
|
||||||
RCC_DIR = temp
|
RCC_DIR = temp
|
||||||
MOC_DIR = temp
|
MOC_DIR = temp
|
||||||
OBJECTS_DIR = temp
|
OBJECTS_DIR = temp
|
||||||
|
UI_DIR = temp
|
||||||
CONFIG += warn_on
|
CONFIG += warn_on
|
||||||
RESOURCES = gui.qrc
|
RESOURCES = gui.qrc
|
||||||
FORMS = main.ui \
|
FORMS = main.ui \
|
||||||
|
@ -29,89 +26,51 @@ TRANSLATIONS = cppcheck_fi.ts \
|
||||||
# Windows-specific options
|
# Windows-specific options
|
||||||
CONFIG += embed_manifest_exe
|
CONFIG += embed_manifest_exe
|
||||||
|
|
||||||
# Input
|
include($$PWD/../src/src.pri)
|
||||||
HEADERS += mainwindow.h \
|
HEADERS += mainwindow.h \
|
||||||
checkthread.h \
|
checkthread.h \
|
||||||
resultsview.h \
|
resultsview.h \
|
||||||
resultstree.h \
|
resultstree.h \
|
||||||
settingsdialog.h \
|
settingsdialog.h \
|
||||||
threadresult.h \
|
threadresult.h \
|
||||||
threadhandler.h \
|
threadhandler.h \
|
||||||
applicationlist.h \
|
applicationlist.h \
|
||||||
applicationdialog.h \
|
applicationdialog.h \
|
||||||
aboutdialog.h \
|
aboutdialog.h \
|
||||||
common.h \
|
common.h \
|
||||||
fileviewdialog.h \
|
fileviewdialog.h \
|
||||||
projectfile.h \
|
projectfile.h \
|
||||||
report.h \
|
report.h \
|
||||||
txtreport.h \
|
txtreport.h \
|
||||||
xmlreport.h \
|
xmlreport.h \
|
||||||
translationhandler.h \
|
translationhandler.h \
|
||||||
csvreport.h \
|
csvreport.h
|
||||||
../src/checkautovariables.h \
|
SOURCES += main.cpp \
|
||||||
../src/checkdangerousfunctions.h \
|
mainwindow.cpp\
|
||||||
../src/checkheaders.h \
|
checkthread.cpp \
|
||||||
../src/cppcheck.h \
|
resultsview.cpp \
|
||||||
../src/mathlib.h \
|
resultstree.cpp \
|
||||||
../src/settings.h \
|
threadresult.cpp \
|
||||||
../src/tokenize.h \
|
threadhandler.cpp \
|
||||||
../src/checkbufferoverrun.h \
|
settingsdialog.cpp \
|
||||||
../src/checkmemoryleak.h \
|
applicationlist.cpp \
|
||||||
../src/checkstl.h \
|
applicationdialog.cpp \
|
||||||
../src/checkunusedfunctions.h \
|
aboutdialog.cpp \
|
||||||
../src/errorlogger.h \
|
fileviewdialog.cpp \
|
||||||
../src/preprocessor.h \
|
projectfile.cpp \
|
||||||
../src/threadexecutor.h \
|
report.cpp \
|
||||||
../src/checkclass.h \
|
txtreport.cpp \
|
||||||
../src/check.h \
|
xmlreport.cpp \
|
||||||
../src/checkother.h \
|
translationhandler.cpp \
|
||||||
../src/cppcheckexecutor.h \
|
csvreport.cpp
|
||||||
../src/filelister.h \
|
|
||||||
../src/token.h \
|
|
||||||
../src/classinfo.h \
|
|
||||||
|
|
||||||
|
|
||||||
SOURCES += main.cpp \
|
|
||||||
mainwindow.cpp\
|
|
||||||
checkthread.cpp \
|
|
||||||
resultsview.cpp \
|
|
||||||
resultstree.cpp \
|
|
||||||
threadresult.cpp \
|
|
||||||
threadhandler.cpp \
|
|
||||||
settingsdialog.cpp \
|
|
||||||
applicationlist.cpp \
|
|
||||||
applicationdialog.cpp \
|
|
||||||
aboutdialog.cpp \
|
|
||||||
fileviewdialog.cpp \
|
|
||||||
projectfile.cpp \
|
|
||||||
report.cpp \
|
|
||||||
txtreport.cpp \
|
|
||||||
xmlreport.cpp \
|
|
||||||
translationhandler.cpp \
|
|
||||||
csvreport.cpp \
|
|
||||||
../src/checkautovariables.cpp \
|
|
||||||
../src/checkdangerousfunctions.cpp \
|
|
||||||
../src/checkmemoryleak.cpp \
|
|
||||||
../src/checkstl.cpp \
|
|
||||||
../src/errorlogger.cpp \
|
|
||||||
../src/mathlib.cpp \
|
|
||||||
../src/threadexecutor.cpp \
|
|
||||||
../src/checkbufferoverrun.cpp \
|
|
||||||
../src/checkother.cpp \
|
|
||||||
../src/cppcheck.cpp \
|
|
||||||
../src/filelister.cpp \
|
|
||||||
../src/preprocessor.cpp \
|
|
||||||
../src/token.cpp \
|
|
||||||
../src/checkclass.cpp \
|
|
||||||
../src/checkheaders.cpp \
|
|
||||||
../src/cppcheckexecutor.cpp \
|
|
||||||
../src/checkunusedfunctions.cpp \
|
|
||||||
../src/settings.cpp \
|
|
||||||
../src/tokenize.cpp
|
|
||||||
|
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
RC_FILE = cppcheck-gui.rc
|
RC_FILE = cppcheck-gui.rc
|
||||||
HEADERS += ../src/resource.h
|
HEADERS += ../src/resource.h
|
||||||
LIBS += -lshlwapi
|
LIBS += -lshlwapi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# run lrelease before build
|
||||||
|
lrelease.commands = lrelease gui.pro
|
||||||
|
QMAKE_EXTRA_TARGETS += lrelease
|
||||||
|
PRE_TARGETDEPS += lrelease
|
||||||
|
|
19
readme.txt
19
readme.txt
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
=========
|
=========
|
||||||
Cppcheck
|
Cppcheck
|
||||||
=========
|
=========
|
||||||
|
@ -17,17 +15,13 @@ Compiling
|
||||||
|
|
||||||
The Makefile works under Linux.
|
The Makefile works under Linux.
|
||||||
To make it work under Windows with DJGPP, change "g++" to "gxx".
|
To make it work under Windows with DJGPP, change "g++" to "gxx".
|
||||||
|
|
||||||
To build cppcheck with qmake, run the commands:
|
|
||||||
cd src
|
|
||||||
qmake -config release (or '-config debug' if doing developer build)
|
|
||||||
make
|
|
||||||
|
|
||||||
To compile the GUI one needs Qt development libraries and issue the following commands:
|
To build cppcheck with qmake, run this commands:
|
||||||
cd gui
|
qmake -config release – this will generate Makefile (use 'debug' instead of 'release' if doing developer build)
|
||||||
qmake -config release (or '-config debug' if doing developer build)
|
make – this will build command-line tool, GUI and autotests
|
||||||
lrelease gui.pro
|
make sub-src – this will build command-line tool only
|
||||||
make
|
make check – this one will build and run autotests
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
|
|
||||||
|
@ -43,4 +37,3 @@ Webpage
|
||||||
|
|
||||||
http://www.sf.net/projects/cppcheck
|
http://www.sf.net/projects/cppcheck
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
# Common project include with headers and sources
|
||||||
|
|
||||||
|
HEADERS += $$PWD/check.h \
|
||||||
|
$$PWD/checkautovariables.h \
|
||||||
|
$$PWD/checkbufferoverrun.h \
|
||||||
|
$$PWD/checkclass.h \
|
||||||
|
$$PWD/checkdangerousfunctions.h \
|
||||||
|
$$PWD/checkheaders.h \
|
||||||
|
$$PWD/checkmemoryleak.h \
|
||||||
|
$$PWD/checkother.h \
|
||||||
|
$$PWD/checkstl.h \
|
||||||
|
$$PWD/checkunusedfunctions.h \
|
||||||
|
$$PWD/classinfo.h \
|
||||||
|
$$PWD/cppcheck.h \
|
||||||
|
$$PWD/cppcheckexecutor.h \
|
||||||
|
$$PWD/errorlogger.h \
|
||||||
|
$$PWD/filelister.h \
|
||||||
|
$$PWD/mathlib.h \
|
||||||
|
$$PWD/preprocessor.h \
|
||||||
|
$$PWD/resource.h \
|
||||||
|
$$PWD/settings.h \
|
||||||
|
$$PWD/threadexecutor.h \
|
||||||
|
$$PWD/token.h \
|
||||||
|
$$PWD/tokenize.h
|
||||||
|
|
||||||
|
# no main.cpp here
|
||||||
|
SOURCES += $$PWD/checkautovariables.cpp \
|
||||||
|
$$PWD/checkbufferoverrun.cpp \
|
||||||
|
$$PWD/checkclass.cpp \
|
||||||
|
$$PWD/checkdangerousfunctions.cpp \
|
||||||
|
$$PWD/checkheaders.cpp \
|
||||||
|
$$PWD/checkmemoryleak.cpp \
|
||||||
|
$$PWD/checkother.cpp \
|
||||||
|
$$PWD/checkstl.cpp \
|
||||||
|
$$PWD/checkunusedfunctions.cpp \
|
||||||
|
$$PWD/cppcheck.cpp \
|
||||||
|
$$PWD/cppcheckexecutor.cpp \
|
||||||
|
$$PWD/errorlogger.cpp \
|
||||||
|
$$PWD/filelister.cpp \
|
||||||
|
$$PWD/mathlib.cpp \
|
||||||
|
$$PWD/preprocessor.cpp \
|
||||||
|
$$PWD/settings.cpp \
|
||||||
|
$$PWD/threadexecutor.cpp \
|
||||||
|
$$PWD/token.cpp \
|
||||||
|
$$PWD/tokenize.cpp
|
49
src/src.pro
49
src/src.pro
|
@ -1,7 +1,3 @@
|
||||||
######################################################################
|
|
||||||
# Automatically generated by qmake (2.01a) Mon Jul 13 10:40:01 2009
|
|
||||||
######################################################################
|
|
||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET = cppcheck
|
TARGET = cppcheck
|
||||||
DEPENDPATH += .
|
DEPENDPATH += .
|
||||||
|
@ -10,49 +6,8 @@ OBJECTS_DIR = temp
|
||||||
CONFIG += warn_on
|
CONFIG += warn_on
|
||||||
CONFIG -= qt app_bundle
|
CONFIG -= qt app_bundle
|
||||||
|
|
||||||
# Input
|
include($$PWD/src.pri)
|
||||||
HEADERS += check.h \
|
SOURCES += main.cpp
|
||||||
checkautovariables.h \
|
|
||||||
checkbufferoverrun.h \
|
|
||||||
checkclass.h \
|
|
||||||
checkdangerousfunctions.h \
|
|
||||||
checkheaders.h \
|
|
||||||
checkmemoryleak.h \
|
|
||||||
checkother.h \
|
|
||||||
checkstl.h \
|
|
||||||
checkunusedfunctions.h \
|
|
||||||
classinfo.h \
|
|
||||||
cppcheck.h \
|
|
||||||
cppcheckexecutor.h \
|
|
||||||
errorlogger.h \
|
|
||||||
filelister.h \
|
|
||||||
mathlib.h \
|
|
||||||
preprocessor.h \
|
|
||||||
resource.h \
|
|
||||||
settings.h \
|
|
||||||
threadexecutor.h \
|
|
||||||
token.h \
|
|
||||||
tokenize.h
|
|
||||||
SOURCES += checkautovariables.cpp \
|
|
||||||
checkbufferoverrun.cpp \
|
|
||||||
checkclass.cpp \
|
|
||||||
checkdangerousfunctions.cpp \
|
|
||||||
checkheaders.cpp \
|
|
||||||
checkmemoryleak.cpp \
|
|
||||||
checkother.cpp \
|
|
||||||
checkstl.cpp \
|
|
||||||
checkunusedfunctions.cpp \
|
|
||||||
cppcheck.cpp \
|
|
||||||
cppcheckexecutor.cpp \
|
|
||||||
errorlogger.cpp \
|
|
||||||
filelister.cpp \
|
|
||||||
main.cpp \
|
|
||||||
mathlib.cpp \
|
|
||||||
preprocessor.cpp \
|
|
||||||
settings.cpp \
|
|
||||||
threadexecutor.cpp \
|
|
||||||
token.cpp \
|
|
||||||
tokenize.cpp
|
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
CONFIG += embed_manifest_exe console
|
CONFIG += embed_manifest_exe console
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
######################################################################
|
|
||||||
# Automatically generated by qmake (2.01a) Mon Jul 13 17:37:53 2009
|
|
||||||
######################################################################
|
|
||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET = test
|
TARGET = test
|
||||||
DEPENDPATH += .
|
DEPENDPATH += .
|
||||||
|
@ -11,26 +7,8 @@ CONFIG += warn_on debug
|
||||||
CONFIG -= qt app_bundle
|
CONFIG -= qt app_bundle
|
||||||
DEFINES += UNIT_TESTING
|
DEFINES += UNIT_TESTING
|
||||||
|
|
||||||
# Input
|
include($$PWD/../src/src.pri)
|
||||||
HEADERS += testsuite.h \
|
HEADERS += testsuite.h
|
||||||
../src/tokenize.h \
|
|
||||||
../src/settings.h \
|
|
||||||
../src/errorlogger.h \
|
|
||||||
../src/token.h \
|
|
||||||
../src/checkautovariables.h \
|
|
||||||
../src/check.h \
|
|
||||||
../src/checkbufferoverrun.h \
|
|
||||||
../src/checkother.h \
|
|
||||||
../src/checkclass.h \
|
|
||||||
../src/cppcheck.h \
|
|
||||||
../src/checkunusedfunctions.h \
|
|
||||||
../src/checkdangerousfunctions.h \
|
|
||||||
../src/filelister.h \
|
|
||||||
../src/mathlib.h \
|
|
||||||
../src/checkmemoryleak.h \
|
|
||||||
../src/preprocessor.h \
|
|
||||||
../src/checkstl.h \
|
|
||||||
../src/checkheaders.h
|
|
||||||
SOURCES += testautovariables.cpp \
|
SOURCES += testautovariables.cpp \
|
||||||
testbufferoverrun.cpp \
|
testbufferoverrun.cpp \
|
||||||
testcharvar.cpp \
|
testcharvar.cpp \
|
||||||
|
@ -54,24 +32,7 @@ SOURCES += testautovariables.cpp \
|
||||||
testtokenize.cpp \
|
testtokenize.cpp \
|
||||||
testunusedfunctions.cpp \
|
testunusedfunctions.cpp \
|
||||||
testunusedprivfunc.cpp \
|
testunusedprivfunc.cpp \
|
||||||
testunusedvar.cpp \
|
testunusedvar.cpp
|
||||||
../src/tokenize.cpp \
|
|
||||||
../src/settings.cpp \
|
|
||||||
../src/errorlogger.cpp \
|
|
||||||
../src/token.cpp \
|
|
||||||
../src/checkautovariables.cpp \
|
|
||||||
../src/checkbufferoverrun.cpp \
|
|
||||||
../src/checkother.cpp \
|
|
||||||
../src/checkclass.cpp \
|
|
||||||
../src/cppcheck.cpp \
|
|
||||||
../src/checkunusedfunctions.cpp \
|
|
||||||
../src/checkdangerousfunctions.cpp \
|
|
||||||
../src/filelister.cpp \
|
|
||||||
../src/mathlib.cpp \
|
|
||||||
../src/checkmemoryleak.cpp \
|
|
||||||
../src/preprocessor.cpp \
|
|
||||||
../src/checkstl.cpp \
|
|
||||||
../src/CheckHeaders.cpp
|
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
CONFIG += console
|
CONFIG += console
|
||||||
|
|
Loading…
Reference in New Issue