GIT_SILENT: Use more target-centric cmake code

2 jobs for master in 3 minutes and 40 seconds (queued for 124 minutes and 1 second)
Status Job ID Name Coverage
  Build
passed #108588
build_clazy_clang_tidy

00:02:05

passed #108587
linux kf5-qt5 qt5.15

00:01:34

0.0%