<div dir="ltr">Hi all,<div><br></div><div>I have also ran into this issue but my understanding is that its more appropriate to use target_compile_options rather than directly modifying CXX_FLAGS because the latter can cause issues when trying to make debug builds, depending on how that is being done.  I added this in vtkModuleMacros.cmake, which works well:<div><br></div><div><div># Enable C++11 compiler features if requested</div><div>if (VTK_USE_CXX11_FEATURES)</div><div>    target_compile_options(${vtk-module} INTERFACE -std=c++11)</div><div> endif()</div></div><div><br></div><div><br></div><div>G</div></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, May 27, 2016 at 11:26 AM Hahn, Steven E. <<a href="mailto:hahnse@ornl.gov">hahnse@ornl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<div bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">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.
<br>
<br>
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/1314" target="_blank">https://gitlab.kitware.com/vtk/vtk/merge_requests/1314</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Best,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Steven<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black">vtk-developers <<a href="mailto:vtk-developers-bounces@vtk.org" target="_blank">vtk-developers-bounces@vtk.org</a>> on behalf of Shawn Waldon <<a href="mailto:shawn.waldon@kitware.com" target="_blank">shawn.waldon@kitware.com</a>><br>
<b>Date: </b>Friday, May 27, 2016 at 8:42 AM<br>
<b>To: </b>"<a href="mailto:andrew.amaclean@gmail.com" target="_blank">andrew.amaclean@gmail.com</a>" <<a href="mailto:andrew.amaclean@gmail.com" target="_blank">andrew.amaclean@gmail.com</a>><br>
<b>Cc: </b>VTK Developers <<a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a>><br>
<b>Subject: </b>Re: [vtk-developers] C++11 compiler flags not set.<u></u><u></u></span></p>
</div></div></div><div bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Andrew,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Shawn<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, May 27, 2016 at 1:42 AM, Andrew Maclean <<a href="mailto:andrew.amaclean@gmail.com" target="_blank">andrew.amaclean@gmail.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">Has anyone else noticed this issue?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">Currently when building the master, I am getting many warnings along these lines:
<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">"warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">   void UnRegister(vtkObjectBase* o) VTK_OVERRIDE;"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">It seems VTK_USE_CXX11_FEATURES is not setting the compiler flags for C++11.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">The evidence for this is that I get a clean build when manually adding -std=c++11 to CXXFLAGS.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Once this is done the only warnings are those about auto_ptr being deprecated.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I'm building on Ubuntu 16.04, gcc 5.3.1 using the latest master.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Regards<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">   Andrew<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888"><br>
-- <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">___________________________________________<br>
Andrew J. P. Maclean<br>
<br>
___________________________________________<u></u><u></u></span></p>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" target="_blank">
http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
<u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div></div>

_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
</blockquote></div>