[vtk-developers] Introducing (optional) C++11 features in VTK

Brad King brad.king at kitware.com
Thu Aug 21 09:20:54 EDT 2014


On 08/20/2014 06:39 PM, Andrew Maclean wrote:
> To help the process along I did a cursory search and found these links:
> 
>  C++11 Detection with CMake: http://pageant.ghulbus.eu/?p=664
> 
> And down in the notes there is a comment from Rolf Eike Beer:
> 
> I have pushed a repository for this module online. I have incorporated some of your changes, especially the 3 new tests.
> 
> git clone git://anongit.kde.org/scratch/dakon/cmake-cxx11
> 
> This could make a really good basis for the C++11 implementation.
> I checked out the repository and it seems to work, read CheckCX11features.cmake
> it creates lots of variables called HAS_CXX11_* e.g. HAS_CXX11_LAMBDA

That work was originally proposed for inclusion in CMake, but it has
been superseded by new builtin features in post-3.0 development.

See the new cmake-compile-features(7) manual:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Help/manual/cmake-compile-features.7.rst;hb=4517d6b7

the target_compile_features command:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Help/command/target_compile_features.rst;hb=4517d6b7

and the WriteCompilerDetectionHeader module:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/WriteCompilerDetectionHeader.cmake;hb=4517d6b7

Of course these won't be available until CMake 3.1 and still require
someone to fill in feature tables for MSVC (currently only GCC and
Clang are supported).

-Brad




More information about the vtk-developers mailing list