this post was submitted on 13 Nov 2023
12 points (92.9% liked)

C++

2078 readers
1 users here now

The center for all discussion and news regarding C++.

Rules

founded 2 years ago
MODERATORS
top 1 comments
sorted by: hot top controversial new old
[–] lysdexic@programming.dev 3 points 2 years ago

CMake also helps integrate Cppcheck by setting a single CMake variable when configuring a CMake project: CMAKE_C_CPPCHECK and/or CMAKE_CXX_CPPCHECK.

$ /usr/bin/cmake -DCMAKE_CXX_CPPCHECK:FILEPATH=cppcheck -B./build
$ /usr/bin/cmake --build ./build

Low-effort, high-reward.