There are pros and cons to specifying individual compiler features compared to just specifying a C++ standard overall. It depends somewhat on what else you have to link in. For example, if you link to a third party library built with C++11 settings, you will have to link in that same library to avoid mismatched runtime library problems. More details in one of my blog articles about this here:
https://crascit.com/2015/03/28/enabling-cxx11-in-cmake/ On Thu, Apr 14, 2016 at 10:05 PM, Xi Shen <davidshe...@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 > -- Craig Scott Melbourne, Australia http://crascit.com
-- 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