readme: Add instructions for cmake

This commit is contained in:
Daniel Marjamäki 2019-06-27 06:51:59 +02:00
parent 0f89280b94
commit fef7bc584d
2 changed files with 43 additions and 0 deletions

View File

@ -31,6 +31,29 @@ There are multiple compilation choices:
* g++ 4.6 (or later) * g++ 4.6 (or later)
* clang++ * 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 ### qmake
You can use the gui/gui.pro file to build the GUI. You can use the gui/gui.pro file to build the GUI.

View File

@ -31,6 +31,26 @@ Compiling
* g++ 4.6 (or later) * g++ 4.6 (or later)
* clang++ * 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 qmake
===== =====
You can use the gui/gui.pro file to build the GUI. You can use the gui/gui.pro file to build the GUI.