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 #107949
build_clazy_clang_tidy

00:01:43

passed #107948
linux kf5-qt5 qt5.15

00:01:31

90.0%