[vtk-developers] C++11 compiler flags not set.

Hahn, Steven E. hahnse at ornl.gov
Fri May 27 11:15:51 EDT 2016


I ran into this issue a few months ago and submitted a merge request with changes to set the CXX_FLAGS automatically when VTK_USE_CXX11_FEATURES is set.

https://gitlab.kitware.com/vtk/vtk/merge_requests/1314

Best,
Steven

From: vtk-developers <vtk-developers-bounces at vtk.org> on behalf of Shawn Waldon <shawn.waldon at kitware.com>
Date: Friday, May 27, 2016 at 8:42 AM
To: "andrew.amaclean at gmail.com" <andrew.amaclean at gmail.com>
Cc: VTK Developers <vtk-developers at vtk.org>
Subject: Re: [vtk-developers] C++11 compiler flags not set.

Hi Andrew,
That looks like it is probably a bug in the CMake code for VTK_USE_CXX11_FEATURES.  I added that flag... I'll take a look at it this weekend.
Shawn

On Fri, May 27, 2016 at 1:42 AM, Andrew Maclean <andrew.amaclean at gmail.com<mailto:andrew.amaclean at gmail.com>> wrote:
Has anyone else noticed this issue?

Currently when building the master, I am getting many warnings along these lines:
"warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
   void UnRegister(vtkObjectBase* o) VTK_OVERRIDE;"

It seems VTK_USE_CXX11_FEATURES is not setting the compiler flags for C++11.
The evidence for this is that I get a clean build when manually adding -std=c++11 to CXXFLAGS.
Once this is done the only warnings are those about auto_ptr being deprecated.

I thought the role of VTK_USE_CXX11_FEATURES was to set up the compiler to use c++11 features making it unnecessary to add it in CXXFLAGS.

I'm building on Ubuntu 16.04, gcc 5.3.1 using the latest master.

Regards
   Andrew

--
___________________________________________
Andrew J. P. Maclean

___________________________________________

_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160527/a7b852fb/attachment.html>


More information about the vtk-developers mailing list