Skip to content

Commit

Permalink
readme: Add instructions for cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Jun 27, 2019
1 parent 0f89280 commit fef7bc5
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
23 changes: 23 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,29 @@ There are multiple compilation choices:
* g++ 4.6 (or later)
* clang++

### cmake

Example, compiling Cppcheck with cmake:

```shell
mkdir b
cd b
cmake ..
make
```

If you need to specify c++ standard you can do it with the option
-DCMAKE_CXX_STANDARD=11

If you want to compile the GUI you can use the flag
-DBUILD_GUI=ON

For rules support (requires pcre) use the flag
-DHAVE_RULES=ON

For release builds it is recommended that you use:
-DUSE_MATCHCOMPILER=ON

### qmake

You can use the gui/gui.pro file to build the GUI.
Expand Down
20 changes: 20 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ Compiling
* g++ 4.6 (or later)
* clang++

cmake
=====
Example, compiling Cppcheck with cmake:
mkdir b
cd b
cmake ..
make

If you need to specify c++ standard you can do it with the option
-DCMAKE_CXX_STANDARD=11

If you want to compile the GUI you can use the flag
-DBUILD_GUI=ON

For rules support (requires pcre) use the flag
-DHAVE_RULES=ON

For release builds it is recommended that you use:
-DUSE_MATCHCOMPILER=ON

qmake
=====
You can use the gui/gui.pro file to build the GUI.
Expand Down

0 comments on commit fef7bc5

Please sign in to comment.