CMP0101.rst 1.2 KB

1234567891011121314151617181920212223242526272829
  1. CMP0101
  2. -------
  3. .. versionadded:: 3.17
  4. :command:`target_compile_options` now always honors the ``BEFORE`` keyword.
  5. In CMake 3.16 and below, the :command:`target_compile_options` command
  6. ignores the ``BEFORE`` keyword when inserting items into the
  7. :prop_tgt:`COMPILE_OPTIONS` target property (``PRIVATE`` and ``PUBLIC``
  8. items). CMake 3.17 and later honors the ``BEFORE`` keyword in all cases.
  9. This policy provides compatibility for projects that have not been updated
  10. to expect the new behavior.
  11. The behavior of inserting items into the :prop_tgt:`INTERFACE_COMPILE_OPTIONS`
  12. target property (``PUBLIC`` and ``INTERFACE`` items) is not affected by this
  13. policy. The ``BEFORE`` keyword has always been honored when adding items to
  14. :prop_tgt:`INTERFACE_COMPILE_OPTIONS`.
  15. The ``OLD`` behavior for this policy is to not honor the ``BEFORE`` keyword
  16. when inserting into the :prop_tgt:`COMPILE_OPTIONS` property.
  17. The ``NEW`` behavior for this policy is to honor the ``BEFORE`` keyword in
  18. all cases.
  19. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.17
  20. .. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn
  21. .. include:: include/STANDARD_ADVICE.rst
  22. .. include:: include/DEPRECATED.rst