[CMake] How to set C++ standard?

Alex Chen alex_chen at filemaker.com
Thu Apr 20 18:57:52 EDT 2017


I tried to set the compiler flag –std=c++14 via cmake command line on Linux with –DCMAKE_CXX_STANDARD=14.  The message from ‘make’ shows   -std=c++11 –std=gnu++14

If I do not set that flag, I get -std=c++11.  This seem to imply the CMAKE_CXX_STANDARD flag sets gnu++ instead of c++.  How do I set the flag –std=c++14 then?

 

Alex Chen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170420/85a615b9/attachment.html>


More information about the CMake mailing list