diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2022-02-06 15:46:33 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2022-02-25 10:08:17 (GMT) |
commit | 01ff75b2ff90cc5cd3db509e24d5691a2a7815e7 (patch) | |
tree | 2d0a39eb6488aa6c3eb4f3e75f4632719bd486b8 /Source/cmComputeLinkDepends.cxx | |
parent | c515ac41ee5a7249b9816d2cceb36cebf828a7f7 (diff) | |
download | CMake-01ff75b2ff90cc5cd3db509e24d5691a2a7815e7.zip CMake-01ff75b2ff90cc5cd3db509e24d5691a2a7815e7.tar.gz CMake-01ff75b2ff90cc5cd3db509e24d5691a2a7815e7.tar.bz2 |
cmComputeDepends::LinkEntry: introduce enum to specify item type
Diffstat (limited to 'Source/cmComputeLinkDepends.cxx')
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index d22a4f2..7c8de9e 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -395,9 +395,11 @@ std::pair<int, bool> cmComputeLinkDepends::AddLinkEntry(cmLinkItem const& item) LinkEntry& entry = this->EntryList[index]; entry.Item = BT<std::string>(item.AsStr(), item.Backtrace); entry.Target = item.Target; - entry.IsFlag = (!entry.Target && entry.Item.Value[0] == '-' && - entry.Item.Value[1] != 'l' && - entry.Item.Value.substr(0, 10) != "-framework"); + if (!entry.Target && entry.Item.Value[0] == '-' && + entry.Item.Value[1] != 'l' && + entry.Item.Value.substr(0, 10) != "-framework") { + entry.Kind = LinkEntry::Flag; + } // If the item has dependencies queue it to follow them. if (entry.Target) { @@ -411,7 +413,7 @@ std::pair<int, bool> cmComputeLinkDepends::AddLinkEntry(cmLinkItem const& item) // The item dependencies are known. Follow them. BFSEntry qe = { index, val->c_str() }; this->BFSQueue.push(qe); - } else if (!entry.IsFlag) { + } else if (entry.Kind != LinkEntry::Flag) { // The item dependencies are not known. We need to infer them. this->InferredDependSets[index].Initialized = true; } @@ -434,7 +436,7 @@ void cmComputeLinkDepends::AddLinkObject(cmLinkItem const& item) int index = lei.first->second; LinkEntry& entry = this->EntryList[index]; entry.Item = BT<std::string>(item.AsStr(), item.Backtrace); - entry.IsObject = true; + entry.Kind = LinkEntry::Object; // Record explicitly linked object files separately. this->ObjectEntries.emplace_back(index); @@ -521,7 +523,7 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep) // This item was added specifically because it is a dependent // shared library. It may get special treatment // in cmComputeLinkInformation. - entry.IsSharedDep = true; + entry.Kind = LinkEntry::SharedDep; } // Get the link entry for this target. @@ -734,7 +736,7 @@ void cmComputeLinkDepends::AddLinkEntries(int depender_index, // items are outside libraries that should not be depending on // targets. if (!this->EntryList[dependee_index].Target && - !this->EntryList[dependee_index].IsFlag && + this->EntryList[dependee_index].Kind != LinkEntry::Flag && dependee_index != dependSet.first) { dependSet.second.insert(dependee_index); } |