aboutsummaryrefslogtreecommitdiff
path: root/cmake/CppCheck.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/CppCheck.cmake')
-rw-r--r--cmake/CppCheck.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/CppCheck.cmake b/cmake/CppCheck.cmake
new file mode 100644
index 0000000..d8a4559
--- /dev/null
+++ b/cmake/CppCheck.cmake
@@ -0,0 +1,11 @@
+find_program(CMAKE_CXX_CPPCHECK NAMES cppcheck)
+
+if(CMAKE_CXX_CPPCHECK)
+ list(APPEND CMAKE_CXX_CPPCHECK
+ --std=c++20
+ --enable=all
+ --inconclusive
+ --quiet
+ --suppressions-list=${PROJECT_SOURCE_DIR}/CppCheckSuppressions.txt
+ )
+endif()