GIT_SILENT: Use more target-centric cmake code

2 jobs for master in 3 minutes and 14 seconds (queued for 46 minutes and 46 seconds)
Status Job ID Name Coverage
  Build
passed build_clazy_clang_tidy #107949

00:01:43

passed linux kf5-qt5 qt5.15 #107948

00:01:31

90.0%