diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f75335fbd11225c647c7115f7e8aa92b0cd9f0cc..10d714a0714963b15ed82fcf2f69bc7fceeeb21b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -112,6 +112,7 @@ full-dune-master-gcc-cpp-20:
   variables:
     IMAGE: $IMAGE_REGISTRY_URL/full:dune-master-gcc-ubuntu-22.04
     CXX_MAX_STANDARD: "20"
+    DUMUX_ENABLE_CPPCHECK: "true"
 
 ##################################
 # additional scheduled pipelines #
diff --git a/.gitlab-ci/default.yml b/.gitlab-ci/default.yml
index fe8f1923c201f4a575a84a1f2f200fb06b89cae9..f750c569ef923405e2ca60ff6157a367f5da1474 100644
--- a/.gitlab-ci/default.yml
+++ b/.gitlab-ci/default.yml
@@ -22,6 +22,7 @@ variables:
   MR_TARGET_BRANCH_NAME: ""
   REFERENCE_SHA: ""
   CXX_MAX_STANDARD: "17"
+  DUMUX_ENABLE_CPPCHECK: ""
 
 
 configure:
@@ -98,6 +99,8 @@ cppcheck:
   needs:
     - job: configure
       artifacts: true
+  rules:
+    - if: $DUMUX_ENABLE_CPPCHECK == "true"
 
 select tests:
   stage: select
@@ -172,6 +175,7 @@ compile cpp:
       artifacts: true
     - job: cppcheck
       artifacts: false
+      optional: true
 
 
 test cpp: