mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
cmake: Model normal and try-compile project kinds explicitly
Construct with the project kind instead of mutating state after construction.
This commit is contained in:
@@ -548,7 +548,7 @@ void cmListFileBacktrace::PrintTitle(std::ostream& out) const
|
||||
}
|
||||
cmListFileContext lfc = this->TopEntry->Context;
|
||||
cmStateSnapshot bottom = this->GetBottom();
|
||||
if (!bottom.GetState()->GetIsInTryCompile()) {
|
||||
if (bottom.GetState()->GetProjectKind() == cmState::ProjectKind::Normal) {
|
||||
lfc.FilePath = cmSystemTools::RelativeIfUnder(
|
||||
bottom.GetState()->GetSourceDirectory(), lfc.FilePath);
|
||||
}
|
||||
@@ -579,7 +579,7 @@ void cmListFileBacktrace::PrintCallStack(std::ostream& out) const
|
||||
out << "Call Stack (most recent call first):\n";
|
||||
}
|
||||
cmListFileContext lfc = cur->Context;
|
||||
if (!bottom.GetState()->GetIsInTryCompile()) {
|
||||
if (bottom.GetState()->GetProjectKind() == cmState::ProjectKind::Normal) {
|
||||
lfc.FilePath = cmSystemTools::RelativeIfUnder(
|
||||
bottom.GetState()->GetSourceDirectory(), lfc.FilePath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user