[cfe-dev] RFC: A proposal to move toward using C++11 features in LLVM & Clang / bounding support for old host compilers

Stephen Kelly steveire at gmail.com
Mon Oct 28 06:20:47 PDT 2013


David Tweed wrote:

> So this complexity highlights to me one important thing: whatever group of
> MSVC tools are
> selected as the baseline, it would be really helpful to have people
> knowledgeable
> about that contribute to the description of precisely which C++11
> constructs are
> allowed

CMake 3.0.0 will have a features support where you specify the features you 
require, and an error is reported at CMake time if the in-use compiler does 
not support the feature (and CMake will add the required -std flag if 
needed).
 
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6726/focus=7746
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6726/focus=7819

 target_compiler_features(foo 
   # 'PUBLIC' means the foo target requires the following features in its 
   # implementation and its interface:
   PUBLIC 
     cxx_variadic_templates
     cxx_override_control
     cxx_lambdas
 )

The names of features are chosen correspond with clang features where it 
makes sense:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/8115/focus=8277

Thanks,

Steve.





More information about the cfe-dev mailing list