Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Doing test compiles in CMake to check whether to use particular

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 14 Jul 2013 10:03:01 -0700
On Jul 14, 2013, at 5:39 AM, tuexen@xxxxxxxxxxxxx wrote:

> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=50576
> 
> User: tuexen
> Date: 2013/07/14 05:39 AM
> 
> Log:
> Don't use compiler options not supported by clang in XCode 4.6.3
> on Apple platforms.

Should try_compile() be used with CMake to test whether particular compiler options are supported by the C compiler, just as the autoconf script uses AC_COMPILE_IFELSE?  (Sadly, it appears that CMake would require that the test program be in a file of its own, rather than letting you embed it in the script, as autoconf does.)