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

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 15 Jul 2013 19:07:54 -0700
On Jul 14, 2013, at 10:03 AM, Guy Harris <guy@xxxxxxxxxxxx> wrote:

> 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.)

Nope, it appears that CHECK_C_SOURCE_COMPILES() can take source code as an argument.  (I couldn't find the string "case-sensitive" in the CMake documentation, so I assume macro/function/etc. names are case-insensitive.)