CMP0041.rst 1.0 KB

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