This causes the `-Wno-deprecated` option to be honored even inside a `try_compile` test project, which is needed to suppress all deprecation warnings as the option documents. Closes: #16446