[cmake-developers] FindCXX11.cmake

Brad King brad.king at kitware.com
Mon Apr 9 16:12:33 EDT 2012


On Mon, Apr 9, 2012 at 3:44 PM, Yury G.  Kudryashov <urkud.urkud at gmail.com> wrote:
> Brad King wrote:
>> Neat.  I like the change to "CheckCXX11Features" instead of "FindCXX11".
> OK. I want some way to explicitly state the required and optional C++11
> features, and don't waste CPU checking for other features.

Right.  I forgot that you proposed the Find interface originally and Eike
just posted what he has for reference.  The Find interface does provide
natural support for required and optional features.  We already provide
some introspection through find_package(Threads) so there is precedent
for such an interface.  The Find interface also provides a nice namespace
prefix CXX11_ naturally as a place to store the results.

Alternatively if the Check-style interface is used I think it would have
to be invoked once for each feature instead of assuming all features need
testing.  That would also allow the user to specify the result variable
name.

Either approach has precedent so I have no opinion on which is better.

-Brad



More information about the cmake-developers mailing list