CMP0041.rst 1.1 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. This policy was introduced in CMake version 3.0. CMake version
  18. |release| warns when the policy is not set and uses ``OLD`` behavior. Use
  19. the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
  20. .. include:: DEPRECATED.txt