[cmake-developers] C++11 and target_compiler_feature proposal

Rolf Eike Beer eike at sf-mail.de
Wed Oct 9 12:21:44 EDT 2013


Am Mittwoch, 9. Oktober 2013, 16:51:42 schrieb Stephen Kelly:
> Brad King wrote:
> > Steve, Eike,
> > 
> > Now that 2.8.12 is tagged I'd like to revive the work to support
> > C++11 features.
> 
> I met Eike in person today at Qt DevDays and talked about this topic a bit.
> 
> The way forward is for me to get the infrastructure in place by cleaning up
> my branch. I'll aim for handling a single feature.
> 
> Then Eike will help with encoding the information in the Modules files and
> the fallback compile tests.
> 
> We'll initially defer the concept of generating a header file with
> defines/MyStaticAssert etc.
> 
> I'll try to get a reviewable and first-feature-complete infrastructure
> branch together soon.

The idea that we agreed upon (or basically: that Steve proposed and which I 
didn't fully understand until today) is that there will be a list of supported 
features for every compiler and version. Usually CMake will just use that list 
when it goes to determine if it could satisfy the requested features from the 
user. If the user believes the list is wrong or simply has a compiler 
currently not in the list he can request to do test-compiles for everything 
requested and use that results. In fact the testcase on all platforms will 
just do exactly that: request all features and compare it with the static 
list. So basically this is just a pre-populated cache.

Afterwards CMake will go through several lists to find out if a compiler flag is 
needed to get that feature enabled. If those features are in the public 
interface of a library target they will be populated upwards.

One thing that is currently unclear if the "simulated compiler id" stuff from 
Brad solves the problem of the Clang plugin running with gcc where one would 
get the gcc version as compiler version but the features are actually 
depending on the version of the Clang plugin.

Steve, anything important I missed?

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20131009/c041b7d3/attachment.sig>


More information about the cmake-developers mailing list