compile-language-features.rst 832 B

123456789101112131415161718
  1. target-language-features
  2. ------------------------
  3. * New :prop_tgt:`CXX_STANDARD` and :prop_tgt:`CXX_EXTENSIONS` target
  4. properties may specify values which CMake uses to compute required
  5. compile options such as ``-std=c++11`` or ``-std=gnu++11``. The
  6. :variable:`CMAKE_CXX_STANDARD` and :variable:`CMAKE_CXX_EXTENSIONS`
  7. variables may be set to initialize the target properties.
  8. * New :prop_tgt:`COMPILE_FEATURES` target property may contain a list
  9. of features required to compile a target. CMake uses this
  10. information to ensure that the compiler in use is capable of building
  11. the target, and to add any necessary compile flags to support language
  12. features.
  13. * New :command:`target_compile_features` command allows populating the
  14. :prop_tgt:`COMPILE_FEATURES` target property, just like any other
  15. build variable.