Do not define CMAKE_PARENT_LIST_FILE in CMakeLists.txt

Add policy `CMP0198` for compatibility.

Issue: #25026
This commit is contained in:
Benjamin Buch
2025-07-05 00:04:17 -04:00
committed by Brad King
parent 79b5b4ae26
commit 41aea12941
20 changed files with 175 additions and 4 deletions

View File

@@ -8,7 +8,8 @@ While processing a CMake file loaded by :command:`include` or
including it.
While processing a ``CMakeLists.txt`` file, even in subdirectories,
this variable has the same value as :variable:`CMAKE_CURRENT_LIST_FILE`.
this variable is not defined. See policy :policy:`CMP0198`.
While processing a :option:`cmake -P` script, this variable is not defined
in the outermost script.