CMP0198.rst 836 B

1234567891011121314151617181920212223
  1. CMP0198
  2. -------
  3. .. versionadded:: 4.2
  4. :variable:`CMAKE_PARENT_LIST_FILE` is not defined in ``CMakeLists.txt``.
  5. CMake 4.1 and below defined ``CMAKE_PARENT_LIST_FILE`` when processing
  6. a ``CMakeLists.txt`` even though there is no parent file. CMake 4.2
  7. and above prefer to not define ``CMAKE_PARENT_LIST_FILE``. This policy
  8. provides compatibility for projects that accidentally relied on the
  9. old behavior.
  10. The ``OLD`` behavior for this policy is to set
  11. :variable:`CMAKE_PARENT_LIST_FILE` to :variable:`CMAKE_CURRENT_LIST_FILE`
  12. when processing a ``CMakeLists.txt``. The ``NEW`` behavior for this policy
  13. is to not set :variable:`CMAKE_PARENT_LIST_FILE`.
  14. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 4.2
  15. .. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn
  16. .. include:: include/STANDARD_ADVICE.rst
  17. .. include:: include/DEPRECATED.rst