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

Robert Maynard robert.maynard at kitware.com
Mon Apr 6 17:27:39 EDT 2015


Currently the only compilers that support compiler features are:

Apple Clang versions 4.4 though 6.1.
GNU compiler versions 4.4 through 5.0 on UNIX and Apple.
Microsoft Visual Studio versions 2010 through 2015.
Oracle SolarisStudio version 12.4.

If you are interested in adding support for the intel compilers you can
look at:
Modules/SunPro-CXX-FeatureTests.cmake and Modules/GNU-CXX-FeatureTests.cmake

On Mon, Apr 6, 2015 at 5:08 PM, digitalriptide <digitalriptide at gmail.com>
wrote:

> 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.
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150406/f288f500/attachment-0001.html>


More information about the CMake mailing list