COMPILE_FLAGS.rst 826 B

123456789101112131415161718192021
  1. COMPILE_FLAGS
  2. -------------
  3. Additional flags to be added when compiling this source file.
  4. The ``COMPILE_FLAGS`` property, managed as a string, sets additional compiler
  5. flags used that will be added to the list of compile flags when this source
  6. file builds. The flags will be added after target-wide flags.
  7. Use :prop_sf:`COMPILE_DEFINITIONS` to pass additional preprocessor definitions.
  8. Contents of ``COMPILE_FLAGS`` may use "generator expressions"
  9. with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
  10. manual for available expressions. However, :generator:`Xcode`
  11. does not support per-config per-source settings, so expressions
  12. that depend on the build configuration are not allowed with that
  13. generator.
  14. .. note::
  15. This property has been superseded by the :prop_sf:`COMPILE_OPTIONS` property.