COMPILE_OPTIONS.rst 1.1 KB

123456789101112131415161718192021222324252627
  1. COMPILE_OPTIONS
  2. ---------------
  3. List of options to pass to the compiler.
  4. This property holds a :ref:`semicolon-separated list <CMake Language Lists>`
  5. of options specified so far for its target. Use the
  6. :command:`target_compile_options` command to append more options.
  7. The options will be added after after flags in the
  8. :variable:`CMAKE_<LANG>_FLAGS` and :variable:`CMAKE_<LANG>_FLAGS_<CONFIG>`
  9. variables, but before those propagated from dependencies by the
  10. :prop_tgt:`INTERFACE_COMPILE_OPTIONS` property.
  11. This property adds compile options for all languages in a target.
  12. Use the :genex:`COMPILE_LANGUAGE` generator expression to specify
  13. per-language compile options.
  14. This property is initialized by the :prop_dir:`COMPILE_OPTIONS` directory
  15. property when a target is created, and is used by the generators to set
  16. the options for the compiler.
  17. Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the
  18. syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
  19. for available expressions. See the :manual:`cmake-buildsystem(7)` manual
  20. for more on defining buildsystem properties.
  21. .. include:: ../command/OPTIONS_SHELL.txt