From fef7bc584d795f2d681b1b2c9f87b6aee63946ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 27 Jun 2019 06:51:59 +0200 Subject: [PATCH] readme: Add instructions for cmake --- readme.md | 23 +++++++++++++++++++++++ readme.txt | 20 ++++++++++++++++++++ 2 files changed, 43 insertions(+) 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.