diff --git a/readme.md b/readme.md index 16fe935be..0074c17d4 100644 --- a/readme.md +++ b/readme.md @@ -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. diff --git a/readme.txt b/readme.txt index f53d9d4ef..3f2a5bf96 100644 --- a/readme.txt +++ b/readme.txt @@ -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.