CMP0070.rst 1.0 KB

1234567891011121314151617181920212223242526
  1. CMP0070
  2. -------
  3. .. versionadded:: 3.10
  4. Define :command:`file(GENERATE)` behavior for relative paths.
  5. CMake 3.10 and newer define that relative paths given to ``INPUT`` and
  6. ``OUTPUT`` arguments of ``file(GENERATE)`` are interpreted relative to the
  7. current source and binary directories, respectively. CMake 3.9 and lower did
  8. not define any behavior for relative paths but did not diagnose them either
  9. and accidentally treated them relative to the process working directory.
  10. Policy ``CMP0070`` provides compatibility with projects that used the old
  11. undefined behavior.
  12. This policy affects behavior of relative paths given to ``file(GENERATE)``.
  13. The ``OLD`` behavior for this policy is to treat the paths relative to the
  14. working directory of CMake. The ``NEW`` behavior for this policy is to
  15. interpret relative paths with respect to the current source or binary
  16. directory of the caller.
  17. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.10
  18. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  19. .. include:: include/STANDARD_ADVICE.rst
  20. .. include:: include/DEPRECATED.rst