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

Brad King brad.king at kitware.com
Tue Oct 22 09:21:17 EDT 2013


On 10/21/2013 04:05 PM, Stephen Kelly wrote:
> I'm still not sure that generating a header specific to the compiler (ID and 
> version) is a good idea. 
[snip]
> So, I think maybe it would make sense to list features separately, and if 
> someone does this:

I thought we had reached that conclusion before.  See the bottom of
this message:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6726/focus=7809

Anyway, we agree.

>  write_compiler_detection_header(
>    FILE ${CMAKE_CURRENT_BINARY_DIR}/grantlee_compiler_detection.h
>    PREFIX Grantlee_
>    FEATURES cxx_final cxx_override
>  )

Yes, though it still needs the mandatory VERSION.

> the generated header would look something like this:

Yes.

Actually it appears this header will duplicate most of the compiler feature
knowledge encoded in the CMake platform modules we discussed before.  I
wonder if we can come up with a representation that can be used to generate
both.

-Brad



More information about the cmake-developers mailing list