<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---------- Forwarded message ----------<br>From: Dan Kegel <<a href="mailto:dank@kegel.com">dank@kegel.com</a>><br>To: Chris Stankevitz <<a href="mailto:chrisstankevitz@gmail.com">chrisstankevitz@gmail.com</a>><br>Cc: cmake <<a href="mailto:cmake@cmake.org">cmake@cmake.org</a>><br>Date: Wed, 21 Oct 2015 12:54:44 -0700<br>Subject: Re: [CMake] Asking CMake to setup compiler for c++11<br>Something like<br>
<br>
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)<br>
SET(CMAKE_CXX_STANDARD 11)<br>
<br>
I think.<br>
<br>
On Wed, Oct 21, 2015 at 12:43 PM, Chris Stankevitz<br>
<<a href="mailto:chrisstankevitz@gmail.com">chrisstankevitz@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> Q: What is the "CMake way" to ask that the compiler be setup for c++11?<br>
><br>
> FYI I could not find the answer at<br>
> <a href="https://cmake.org/cmake/help/v3.4/search.html?q=c%2B%2B11" rel="noreferrer" target="_blank">https://cmake.org/cmake/help/v3.4/search.html?q=c%2B%2B11</a><br>
><br><br></blockquote></div><br clear="all"><div>Dan's answer is heading down the right track. Unfortunately, there is some unexpected behaviour in certain situations, such as when the compiler doesn't actually support C++11. For a full explanation of how to set up for C++11, see this article:</div><div><br></div><div><a href="http://crascit.com/2015/03/28/enabling-cxx11-in-cmake/">http://crascit.com/2015/03/28/enabling-cxx11-in-cmake/</a><br></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Craig Scott<br>Melbourne, Australia</div><div><a href="http://crascit.com" target="_blank">http://crascit.com</a></div></div></div>
</div></div>