COMPILE_FLAGS.rst 914 B

12345678910111213141516171819202122
  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 (except in
  7. some cases not supported by the :generator:`Visual Studio 9 2008` generator).
  8. Use :prop_sf:`COMPILE_DEFINITIONS` to pass additional preprocessor definitions.
  9. Contents of ``COMPILE_FLAGS`` may use "generator expressions"
  10. with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
  11. manual 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.
  15. .. note::
  16. This property has been superseded by the :prop_sf:`COMPILE_OPTIONS` property.