Skip to content

VTK_USE_CXX11_FEATURES now enables C++11 compiler flags.

I tried setting the option VTK_USE_CXX11_FEATURES and noticed that –std=gnu++11 is not being added to the compiler flags on either OS X or linux. If I try using VTK_OVERRIDE with clang, 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). I also set these variables earlier so that the same standard is used project-wide.

Merge request reports