소스 검색

cmLinkItem: Add cmLinkImplementation type.

Stephen Kelly 10 년 전
부모
커밋
3846ebcf2b
7개의 변경된 파일15개의 추가작업 그리고 14개의 파일을 삭제
  1. 1 1
      Source/cmComputeLinkDepends.cxx
  2. 1 1
      Source/cmComputeTargetDepends.cxx
  3. 3 3
      Source/cmGeneratorTarget.cxx
  4. 1 1
      Source/cmGlobalXCodeGenerator.cxx
  5. 6 0
      Source/cmLinkItem.h
  6. 2 2
      Source/cmTarget.cxx
  7. 1 6
      Source/cmTarget.h

+ 1 - 1
Source/cmComputeLinkDepends.cxx

@@ -554,7 +554,7 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
 void cmComputeLinkDepends::AddDirectLinkEntries()
 {
   // Add direct link dependencies in this configuration.
-  cmTarget::LinkImplementation const* impl =
+  cmLinkImplementation const* impl =
     this->Target->Target->GetLinkImplementation(this->Config);
   this->AddLinkEntries(-1, impl->Libraries);
   for(std::vector<cmLinkItem>::const_iterator

+ 1 - 1
Source/cmComputeTargetDepends.cxx

@@ -252,7 +252,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
         }
       }
 
-    cmTarget::LinkImplementation const* impl =
+    cmLinkImplementation const* impl =
       depender->Target->GetLinkImplementation(*it);
 
     // A target should not depend on itself.

+ 3 - 3
Source/cmGeneratorTarget.cxx

@@ -1335,7 +1335,7 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config,
 {
   // Get languages built in this target.
   UNORDERED_SET<std::string> languages;
-  cmTarget::LinkImplementation const* impl =
+  cmLinkImplementation const* impl =
                             this->Target->GetLinkImplementation(config);
   assert(impl);
   for(std::vector<std::string>::const_iterator li = impl->Languages.begin();
@@ -4057,7 +4057,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config,
         }
       if (this->GetType() != cmTarget::INTERFACE_LIBRARY)
         {
-        cmTarget::LinkImplementation const* impl =
+        cmLinkImplementation const* impl =
             this->Target->GetLinkImplementation(config);
         for(std::vector<cmLinkImplItem>::const_iterator
               li = impl->Libraries.begin(); li != impl->Libraries.end(); ++li)
@@ -4098,7 +4098,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config,
   if(this->Target->LinkLanguagePropagatesToDependents())
     {
     // Targets using this archive need its language runtime libraries.
-    if(cmTarget::LinkImplementation const* impl =
+    if(cmLinkImplementation const* impl =
        this->Target->GetLinkImplementation(config))
       {
       iface.Languages = impl->Languages;

+ 1 - 1
Source/cmGlobalXCodeGenerator.cxx

@@ -1383,7 +1383,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget)
   if(llang.empty()) { return; }
 
   // If the language is compiled as a source trust Xcode to link with it.
-  cmTarget::LinkImplementation const* impl =
+  cmLinkImplementation const* impl =
     cmtarget.GetLinkImplementation("NOCONFIG");
   for(std::vector<std::string>::const_iterator li = impl->Languages.begin();
       li != impl->Languages.end(); ++li)

+ 6 - 0
Source/cmLinkItem.h

@@ -101,4 +101,10 @@ struct cmHeadToLinkInterfaceMap:
 {
 };
 
+struct cmLinkImplementation: public cmLinkImplementationLibraries
+{
+  // Languages whose runtime libraries must be linked.
+  std::vector<std::string> Languages;
+};
+
 #endif

+ 2 - 2
Source/cmTarget.cxx

@@ -96,7 +96,7 @@ public:
   ImportInfoMapType ImportInfoMap;
 
   // Cache link implementation computation from each configuration.
-  struct OptionalLinkImplementation: public cmTarget::LinkImplementation
+  struct OptionalLinkImplementation: public cmLinkImplementation
   {
     OptionalLinkImplementation():
       LibrariesDone(false), LanguagesDone(false),
@@ -3584,7 +3584,7 @@ void cmTargetInternals::AddInterfaceEntries(
 }
 
 //----------------------------------------------------------------------------
-cmTarget::LinkImplementation const*
+const cmLinkImplementation *
 cmTarget::GetLinkImplementation(const std::string& config) const
 {
   // There is no link implementation for imported targets.

+ 1 - 6
Source/cmTarget.h

@@ -231,12 +231,7 @@ public:
 
   void GetObjectLibrariesCMP0026(std::vector<cmTarget*>& objlibs) const;
 
-  struct LinkImplementation: public cmLinkImplementationLibraries
-  {
-    // Languages whose runtime libraries must be linked.
-    std::vector<std::string> Languages;
-  };
-  LinkImplementation const*
+  cmLinkImplementation const*
     GetLinkImplementation(const std::string& config) const;
 
   cmLinkImplementationLibraries const*