浏览代码

cmLinkItem: Simplify tracking of whether link interface is explicit

We now only need a boolean.
Brad King 6 年之前
父节点
当前提交
94648953be
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      Source/cmGeneratorTarget.cxx
  2. 1 1
      Source/cmLinkItem.h

+ 2 - 2
Source/cmGeneratorTarget.cxx

@@ -5219,7 +5219,7 @@ void cmGeneratorTarget::ComputeLinkInterface(
   const std::string& config, cmOptionalLinkInterface& iface,
   const std::string& config, cmOptionalLinkInterface& iface,
   cmGeneratorTarget const* headTarget) const
   cmGeneratorTarget const* headTarget) const
 {
 {
-  if (iface.ExplicitLibraries) {
+  if (iface.Explicit) {
     if (this->GetType() == cmStateEnums::SHARED_LIBRARY ||
     if (this->GetType() == cmStateEnums::SHARED_LIBRARY ||
         this->GetType() == cmStateEnums::STATIC_LIBRARY ||
         this->GetType() == cmStateEnums::STATIC_LIBRARY ||
         this->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
         this->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
@@ -5659,7 +5659,7 @@ void cmGeneratorTarget::ComputeLinkInterfaceLibraries(
     return;
     return;
   }
   }
   iface.Exists = true;
   iface.Exists = true;
-  iface.ExplicitLibraries = explicitLibraries;
+  iface.Explicit = explicitLibraries != nullptr;
 
 
   if (explicitLibraries) {
   if (explicitLibraries) {
     // The interface libraries have been explicitly set.
     // The interface libraries have been explicitly set.

+ 1 - 1
Source/cmLinkItem.h

@@ -87,7 +87,7 @@ struct cmOptionalLinkInterface : public cmLinkInterface
   bool LibrariesDone = false;
   bool LibrariesDone = false;
   bool AllDone = false;
   bool AllDone = false;
   bool Exists = false;
   bool Exists = false;
-  const char* ExplicitLibraries = nullptr;
+  bool Explicit = false;
 };
 };
 
 
 struct cmHeadToLinkInterfaceMap
 struct cmHeadToLinkInterfaceMap