2009-06-22 11:38:21 +02:00
|
|
|
Project files
|
|
|
|
-------------
|
|
|
|
|
|
|
|
cppcheck GUI handles per-project settings in project files instead of global
|
|
|
|
program settings. This allows customizing cppcheck for each project's needs.
|
|
|
|
|
|
|
|
The project file is simple XML file easy to edit with your favourite editor
|
|
|
|
program. The format is:
|
|
|
|
|
|
|
|
<?xml version="1.0"?>
|
|
|
|
<project version="1">
|
2010-08-20 22:58:00 +02:00
|
|
|
<root name="c:/projects/cppcheck/" />
|
2010-08-14 17:42:37 +02:00
|
|
|
<paths>
|
2010-08-20 22:58:00 +02:00
|
|
|
<dir name="lib/" />
|
2010-08-14 17:42:37 +02:00
|
|
|
</paths>
|
2009-06-22 11:38:21 +02:00
|
|
|
<includedir>
|
2010-08-20 22:58:00 +02:00
|
|
|
<dir name="lib/" />
|
2009-06-22 11:38:21 +02:00
|
|
|
<dir name="c:/projects/framework/" />
|
|
|
|
<dir name="c:/Program Files/Visual Studio 8/VC/include/" />
|
|
|
|
</includedir>
|
2010-05-20 07:22:19 +02:00
|
|
|
<defines>
|
|
|
|
<define name="__cplusplus" />
|
|
|
|
<define name="_MSC_VER=1400" />
|
|
|
|
<define name="_WIN32" />
|
|
|
|
</defines>
|
2011-08-23 18:59:18 +02:00
|
|
|
<exclude>
|
2011-02-28 15:31:46 +01:00
|
|
|
<path name="gui/temp/" />
|
2011-08-23 18:59:18 +02:00
|
|
|
</exclude>
|
2009-06-22 11:38:21 +02:00
|
|
|
</project>
|
|
|
|
|
2010-08-21 21:54:28 +02:00
|
|
|
where:
|
|
|
|
- optional root element defines the root directory for the project. All
|
|
|
|
relative paths are considered to be relative to this path. If the root
|
|
|
|
element is missing or it contains "." as value then the project file's
|
|
|
|
location is considered to be the root path.
|
|
|
|
- paths element contains a list of checked paths. The paths can be relative or
|
|
|
|
absolute paths.
|
|
|
|
- indludedir element contains a list of additional include paths. These
|
|
|
|
include paths are used when finding local include files ("#include "file.h")
|
|
|
|
for source files. The paths can be relative or absolute paths. It is highly
|
|
|
|
recommended that relative paths are used for paths inside the project root
|
|
|
|
folder for better portability.
|
|
|
|
- defines element contains a list of C/C++ preprocessor defines.
|
2011-08-23 18:59:18 +02:00
|
|
|
- exclude element contains list of paths to exclude from the check. The path
|
|
|
|
can be a directory (must end with path separator) or a file.
|
2010-08-21 21:54:28 +02:00
|
|
|
|
2011-05-12 13:09:51 +02:00
|
|
|
For real life examples see the cppcheck.cppcheck-file in the Cppcheck sources
|
|
|
|
root-directory or gui.cppcheck file in gui-directory.
|