summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-07-02 18:23:38 (GMT)
committerBrad King <brad.king@kitware.com>2021-07-12 16:21:52 (GMT)
commit6c440ea3ce36d4c5b1629f111f376e809c7e99b2 (patch)
treee25d3289140a86f185698631e6082ba1991c597e /Source/cmListFileCache.cxx
parent2065bd73cb6a9a3bc463c5bb0dc6877433782973 (diff)
downloadCMake-6c440ea3ce36d4c5b1629f111f376e809c7e99b2.zip
CMake-6c440ea3ce36d4c5b1629f111f376e809c7e99b2.tar.gz
CMake-6c440ea3ce36d4c5b1629f111f376e809c7e99b2.tar.bz2
cmake: Model normal and try-compile project kinds explicitly
Construct with the project kind instead of mutating state after construction.
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r--Source/cmListFileCache.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 4f7c959..2e444f2 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -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);
}