<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Well, I am specifying:<div class=""><br class=""></div><div class="">set(CMAKE_CXX_STANDARD_REQUIRED ON)<br class="">set(CMAKE_CXX_STANDARD 17)<br class="">set(CMAKE_CXX_EXTENSIONS ON)</div><div class=""><br class=""></div><div class="">and the compiler line contains “-std=gnu++1y”. I’m using a very recent source build of CLang and libc++. Any idea why cmake would fall back to 1y in this case?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 6, 2018, at 9:05 AM, Jean-Michaël Celerier <<a href="mailto:jeanmichael.celerier@gmail.com" class="">jeanmichael.celerier@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Note that c++17 is c++1z. c++1y was C++14.<br class=""></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><br class=""></div><div class=""><font color="#783f04" class=""><br class=""></font></div><div class=""><font face="arial, helvetica, sans-serif" size="2" color="#134f5c" class="">-------</font></div><font face="arial, helvetica, sans-serif" size="2" color="#134f5c" class="">Jean-Michaël Celerier</font><div class=""><font face="arial, helvetica, sans-serif" size="2" color="#134f5c" class=""><a href="http://www.jcelerier.name/" target="_blank" class="">http://www.jcelerier.name</a></font></div></div></div></div>
<br class=""><div class="gmail_quote">On Sun, May 6, 2018 at 5:00 PM, Andrew Brownsword <span dir="ltr" class=""><<a href="mailto:andrew.e.brownsword@gmail.com" target="_blank" class="">andrew.e.brownsword@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br class="">
<br class="">
Is there a way to get cmake 3.11 to emit 17 vs 1y when setting CMAKE_CXX_STANDARD? I’m finding that it seems to be a common practice to use the value of the preprocessor define __cplusplus (which is a date), and the value differs depending on whether 17 or 1y is used (at least with CLang). I haven’t figured out how to get cmake to emit -std=c++17, it always seems to use 1y, which is causing problems with code that assumes the __cplusplus date reflects the c++17 standardization date.<br class="">
<br class="">
Thanks,<br class="">
Andrew<br class="">
<br class="">
-- <br class="">
<br class="">
Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank" class="">www.kitware.com</a><br class="">
<br class="">
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank" class="">http://www.cmake.org/Wiki/<wbr class="">CMake_FAQ</a><br class="">
<br class="">
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br class="">
<br class="">
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank" class="">http://cmake.org/cmake/help/<wbr class="">support.html</a><br class="">
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank" class="">http://cmake.org/cmake/help/<wbr class="">consulting.html</a><br class="">
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank" class="">http://cmake.org/cmake/help/<wbr class="">training.html</a><br class="">
<br class="">
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank" class="">http://www.kitware.com/<wbr class="">opensource/opensource.html</a><br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank" class="">https://cmake.org/mailman/<wbr class="">listinfo/cmake</a><br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>