COMPILE_OPTIONS.rst 734 B

1234567891011121314151617
  1. COMPILE_OPTIONS
  2. ---------------
  3. List of additional options to pass to the compiler.
  4. This property holds a :ref:`;-list <CMake Language Lists>` of options
  5. and will be added to the list of compile flags when this
  6. source file builds. Use :prop_sf:`COMPILE_DEFINITIONS` to pass
  7. additional preprocessor definitions and :prop_sf:`INCLUDE_DIRECTORIES` to pass
  8. additional include directories.
  9. Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the
  10. syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
  11. for available expressions. However, :generator:`Xcode`
  12. does not support per-config per-source settings, so expressions
  13. that depend on the build configuration are not allowed with that
  14. generator.