mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
CMP0198: Maintain CMAKE_PARENT_LIST_FILE only when configuring projects
Revise commit 41aea12941 (Do not define CMAKE_PARENT_LIST_FILE in
CMakeLists.txt, 2025-07-05, v4.2.0-rc1~505^2).
This commit is contained in:
@@ -4120,7 +4120,9 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
|
||||
this->StateSnapshot.SetPolicy(id, status);
|
||||
|
||||
// Handle CMAKE_PARENT_LIST_FILE for CMP0198 policy changes
|
||||
if (id == cmPolicies::CMP0198) {
|
||||
if (id == cmPolicies::CMP0198 &&
|
||||
this->GetCMakeInstance()->GetState()->GetRole() ==
|
||||
cmState::Role::Project) {
|
||||
this->UpdateParentListFileVariable();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user