CMP0041.rst 1.1 KB

12345678910111213141516171819202122232425262728
  1. CMP0041
  2. -------
  3. .. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
  4. .. include:: REMOVED_PROLOGUE.txt
  5. Error on relative include with generator expression.
  6. Diagnostics in CMake 2.8.12 and lower silently ignored an entry in the
  7. :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of a target if it contained a generator
  8. expression at any position.
  9. The path entries in that target property should not be relative. High-level
  10. API should ensure that by adding either a source directory or a install
  11. directory prefix, as appropriate.
  12. As an additional diagnostic, the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` generated
  13. on an :prop_tgt:`IMPORTED` target for the install location should not contain
  14. paths in the source directory or the build directory.
  15. The ``OLD`` behavior for this policy is to ignore relative path entries if they
  16. contain a generator expression. The ``NEW`` behavior for this policy is to report
  17. an error if a generator expression appears in another location and the path is
  18. relative.
  19. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0
  20. .. |WARNED_OR_DID_NOT_WARN| replace:: warned
  21. .. include:: REMOVED_EPILOGUE.txt