[vtk-developers] VTK_USE_CXX11_FEATURES not setting -std=gnu++11

Hahn, Steven E. hahnse at ornl.gov
Mon Mar 7 12:25:52 EST 2016


I tried setting the option VTK_USE_CXX11_FEATURES and noticed that –std=gnu++11 is not being set on either OS X or linux. If I try using VTK_OVERRIDE, I get `warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]`

A partial fix appears to be adding `set(CMAKE_CXX_STANDARD 11)` before `set(CMAKE_CXX_STANDARD_REQUIRED 11)` in 
https://gitlab.kitware.com/vtk/vtk/blob/master/Common/Core/CMakeLists.txt#L386. Would it be better to allow C++14 on the compilers which support it? Should these variables be set much earlier (perhaps in https://gitlab.kitware.com/vtk/vtk/blob/master/CMakeLists.txt) so that the same standard is used project-wide?

Would any of these changes make an acceptable merge request?

Best,
Steven Hahn


More information about the vtk-developers mailing list