-
Notifications
You must be signed in to change notification settings - Fork 25
How to analyze CMake projects
Xiao Jia edited this page May 24, 2022
·
8 revisions
-
Prepare your project (with CMakeLists.txt in project root) or run the following command:
git clone https://github.com/naivesystems/analyze-demo.git cd analyze-demo && mkdir -p output
-
Prepare check_rules in the
.naivesystems
subdirectory (e.g..naivesystems/check_rules
). If you are using analyze-demo, this step can be skipped.Example: https://github.com/naivesystems/analyze-demo/blob/master/.naivesystems/check_rules
-
Run NaiveSystems™ Analyze with Podman (suppose $PWD is your project root):
podman run -v $PWD/.naivesystems/config:/config:Z \ -v $PWD:/src:O -v $PWD/output:/output:Z -w /src \ ccr.ccs.tencentyun.com/naivesystems/analyze:2022.1.0.515002 \ /opt/naivesystems/misra_analyzer \ --show_results --project_type=cmake