[CMake] c++11 feature and cmake feature name mapping

Nicholas Braden nicholas11braden at gmail.com
Thu Apr 14 08:31:23 EDT 2016


I don't think CMake can yet detect features of the standard library
implementation, only features of the language. One compiler may
support more features than another compiler which supports more of the
standard library, and in some cases the same compiler can support two
or more different standard libraries. I think you're better off
requesting the language standard you want directly with CXX_STANDARD.

On Thu, Apr 14, 2016 at 7:05 AM, Xi Shen <davidshen84 at gmail.com> wrote:
> Hi,
>
> I know we should use [target_compile_features][1] to enable c++11 features
> in cmake. And I also found the [descriptions][2] about the features.
>
> In my code I used the `random_device`, `default_random_engine` and
> `uniform_int_distribution` which are a new features, but I could not find a
> matching feature in the description.
>
>
> [1]: https://cmake.org/cmake/help/v3.1/command/target_compile_features.html
> [2]:
> https://cmake.org/cmake/help/v3.1/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#prop_gbl:CMAKE_CXX_KNOWN_FEATURES
>
> Thanks,
> David
>
> --
>
> Regards,
> David
>
>
> --
>
> 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


More information about the CMake mailing list