To avoid generator expressions. Generator expresson do not work with
curl_clang_tidy_tests() macro, resulting in an empty `-D` option and
breaking clang-tidy:
```
error: macro name must be an identifier [clang-diagnostic-error]
```
https://github.com/curl/curl/actions/runs/15938223758/job/44962176793?pr=17768#step:14:337
But, curl/curl.h behaves the same on non-Windows with tests/server with
and without CURL_STATICLIB, making it safe to pass for all platforms.