Wireshark-dev: Re: [Wireshark-dev] configure fails with cmake on macosx
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 24 Sep 2010 23:57:56 -0700
Is it just me, or is CMake's "option" command of limited use?

For one thing, there appears to be no way to specify an option on the command line, unlike with autoconf, where you can specify --enable-XXX or --disable-XXX, or specify --withXXX with or without a value or specify --without=XXX?

For another thing, they appear to be purely Boolean - there's no way to have the default value for "with XXX" be "yeah, if XXX is available", with the user able to select "with XXX, and, if XXX isn't available, fail the configuration" or "without XXX, even if it's available"?

The default behavior for, for example, libcap should be "use it if it's available, don't use it if it's not", so that on non-Linux systems (which probably don't have libcap), it Just Works, and for Linux systems that lack libcap, it Just Works (by not building with libcap), and, for Linux systems that have libcap, it Just Works (by building with libcap).  It might be nice to allow the user to override that, but, if CMake doesn't make that easy, I'm inclined to make the default behavior the only available behavior (by explicitly setting CAP_OPTIONS to an empty string, so that REQUIRED is *NOT* one of the option).