diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e28135abf7be06636441d889d7f2d6763e692809..624a197299464f1cb2740697b04e289217ac636b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -137,6 +137,8 @@ cuda_examples_Debug:
         WITH_CUDA: "yes"
         BUILD_TYPE: Debug
         WITH_EXAMPLES: "yes"
+        # build output snippets for documentation
+        WITH_DOC: "yes"
     # store output snippets for documentation
     artifacts:
         paths:
diff --git a/build b/build
index 76169a7c4b20cdc8c6750c23abd7aa6fb675c5e6..67492f02c3c5c90647dceb9c607e9e0f0891d108 100755
--- a/build
+++ b/build
@@ -86,12 +86,11 @@ if [[ ${HELP} == "yes" ]]; then
     echo "   --tests-jobs=NUM                      Number of processes to be used for the unit tests. It is 4 by default."
     echo "   --with-profiling=yes/no               Enables code profiling compiler falgs. 'no' by default."
     echo "   --with-coverage=yes/no                Enables code coverage reports for unit tests. 'no' by default (lcov is required)."
-    echo "   --with-doc=yes/no                     Build documentation. 'yes' by default."
+    echo "   --with-doc=yes/no                     Generate the documentation. 'yes' by default."
     echo "   --with-examples=yes/no                Compile the 'src/Examples' directory. 'yes' by default."
     echo "   --with-tools=yes/no                   Compile the 'src/Tools' directory. 'yes' by default."
     echo "   --with-python=yes/no                  Compile the Python bindings. 'yes' by default."
     echo "   --with-benchmarks=yes/no              Compile the 'src/Benchmarks' directory. 'yes' by default."
-    echo "   --with-doc=yes/no                     Generate the documentation. 'yes' by default."
     echo "   --cmake=CMAKE                         Path to cmake. 'cmake' by default."
     echo "   --verbose                             It enables verbose build."
     echo "   --root-dir=PATH                       Path to the TNL source code root dir."