[CMake] Enable C++11 for a Target with Intel

digitalriptide digitalriptide at gmail.com
Mon Apr 6 17:08:20 EDT 2015


With the GNU compilers I am able to enable C++11 for a specific target
using:
set_target_properties( my_target PROPERTIES CXX_STANDARD 11 )
set_target_properties( my_target PROPERTIES CXX_STANDARD_REQUIRED ON )
When I build, this adds the flag -std=gnu++11, which is great.

If I compile with Intel's compilers, however, this does not add any C++11
flags, and I have to manually append -std=c++11 to CMAKE_CXX_FLAGS. Is this
the intended behavior?

Thank you for advice in this situation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150406/92656791/attachment.html>


More information about the CMake mailing list