<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Is there a project wide CXX_STANDARD_REQUIRED that I can set? I am wanting to migrate our project to C++ 11 and would rather set something in the project root rather than find every place where our own and our customers plugin codes create a target.<div><br></div><div>Thanks</div><div>Mike Jackson</div><div><br><div><div>On Jul 4, 2015, at 5:13 PM, digitalriptide <<a href="mailto:digitalriptide@gmail.com">digitalriptide@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>Thank you for the pointers, adding </div>set( CMAKE_CXX_EXTENSIONS OFF )<br><div>to the root CMakeLists.txt disabled the extensions through the project.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 4, 2015 at 3:52 PM, Thompson, KT <span dir="ltr"><<a href="mailto:kgt@lanl.gov" target="_blank">kgt@lanl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Try setting CMAKE_CXX_EXTENSIONS this to OFF.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="http://www.cmake.org/cmake/help/v3.2/prop_tgt/CXX_EXTENSIONS.html#prop_tgt:CXX_EXTENSIONS" target="_blank">http://www.cmake.org/cmake/help/v3.2/prop_tgt/CXX_EXTENSIONS.html#prop_tgt:CXX_EXTENSIONS</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> CMake [mailto:<a href="mailto:cmake-bounces@cmake.org" target="_blank">cmake-bounces@cmake.org</a>]
<b>On Behalf Of </b>Scott Aron Bloom<br>
<b>Sent:</b> Saturday, July 04, 2015 1:17 AM<br>
<b>To:</b> digitalriptide; <a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a><br>
<b>Subject:</b> Re: [CMake] Setting CXX_STANDARD 11 Enables GNU Extensions<u></u><u></u></span></p>
</div>
</div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">This is why I don’t use the CXX_STANDARD and instead use the CXX_FLAGS and add the flag I need.<u></u><u></u></span></p><p class="MsoNormal"><a name="14e5aa0dcd5c4b03__MailEndCompose"></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> CMake [<a href="mailto:cmake-bounces@cmake.org" target="_blank">mailto:cmake-bounces@cmake.org</a>]
<b>On Behalf Of </b>digitalriptide<br>
<b>Sent:</b> Friday, July 3, 2015 1:56 PM<br>
<b>To:</b> <a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a><br>
<b>Subject:</b> [CMake] Setting CXX_STANDARD 11 Enables GNU Extensions<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p>
<div>
<div><p class="MsoNormal">If I enable C++11 for some target via<u></u><u></u></p>
</div>
<div>
<div><p class="MsoNormal">set_target_properties( SomeTarget PROPERTIES CXX_STANDARD 11 )<u></u><u></u></p>
</div>
<div><p class="MsoNormal">set_target_properties( SomeTarget PROPERTIES CXX_STANDARD_REQUIRED ON )<u></u><u></u></p>
</div>
</div>
<div><p class="MsoNormal">with GCC, the code will then compile with -std=gnu++11. Compiling with -std=gnu++11 enables C++11 *and* the GNU extensions. Is there an option that will result in -std=c++11 in lieu of -std=gnu++11, to build without the the GNU extensions?<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">Thank you!<u></u><u></u></p>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>
-- <br><br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br><br>Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br><br>CMake Support: <a href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a><br>CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a><br>CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html">http://cmake.org/cmake/help/training.html</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/cmake">http://public.kitware.com/mailman/listinfo/cmake</a></blockquote></div><br></div></body></html>