[Cmake-commits] CMake branch, next, updated. v3.4.0-rc1-408-g0f325d3

Stephen Kelly steveire at gmail.com
Sat Oct 10 10:17:20 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  0f325d3427c1a12af88dbe7a149393dfafa1954a (commit)
       via  ca8c0a30492b37fb2e11e3aa68eaf0cae3d366f8 (commit)
       via  51acf2d5770dc6af1f7d75ceca6c7254e3529abf (commit)
       via  c9247dccdd01a9af71ddfdac7972cb9f8d00f4d1 (commit)
       via  bb3d49dd2b6f7c95682a28a87dbb1206cc02b70e (commit)
      from  1e8f1510a0e5c0ae12beca221a427b0a896fca1f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f325d3427c1a12af88dbe7a149393dfafa1954a
commit 0f325d3427c1a12af88dbe7a149393dfafa1954a
Merge: 1e8f151 ca8c0a3
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 10:17:19 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Oct 10 10:17:19 2015 -0400

    Merge topic 'use-generator-target' into next
    
    ca8c0a30 VS10: Use GeneratorTarget instead of Target for name.
    51acf2d5 VS10: Use GeneratorTarget instead of Target for type checks.
    c9247dcc VS10: Use GeneratorTarget instead of Target for property reads.
    bb3d49dd cmTarget: Move link type enum out.


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca8c0a30492b37fb2e11e3aa68eaf0cae3d366f8
commit ca8c0a30492b37fb2e11e3aa68eaf0cae3d366f8
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 15:53:31 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 16:17:10 2015 +0200

    VS10: Use GeneratorTarget instead of Target for name.

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index e63deea..72bcf79 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -178,7 +178,7 @@ cmVisualStudio10TargetGenerator(cmTarget* target,
   this->LocalGenerator =
     (cmLocalVisualStudio7Generator*)
     this->GeneratorTarget->GetLocalGenerator();
-  this->Name = this->Target->GetName();
+  this->Name = this->GeneratorTarget->GetName();
   this->GUID = this->GlobalGenerator->GetGUID(this->Name.c_str());
   this->Platform = gg->GetPlatformName();
   this->NsightTegra = gg->IsNsightTegra();
@@ -1782,7 +1782,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
       if(ttype == cmTarget::OBJECT_LIBRARY)
         {
         outDir = intermediateDir;
-        targetNameFull = this->Target->GetName();
+        targetNameFull = this->GeneratorTarget->GetName();
         targetNameFull += ".lib";
         }
       else
@@ -3331,7 +3331,8 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWP80()
     this->LocalGenerator->GetTargetDirectory(*this->Target);
   this->ConvertToWindowsSlash(artifactDir);
   std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
-  std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
+  std::string targetNameXML =
+      cmVS10EscapeXML(this->GeneratorTarget->GetName());
 
   cmGeneratedFileStream fout(manifestFile.c_str());
   fout.SetCopyIfDifferent(true);
@@ -3414,7 +3415,8 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWP81()
     this->LocalGenerator->GetTargetDirectory(*this->Target);
   this->ConvertToWindowsSlash(artifactDir);
   std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
-  std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
+  std::string targetNameXML =
+      cmVS10EscapeXML(this->GeneratorTarget->GetName());
 
   cmGeneratedFileStream fout(manifestFile.c_str());
   fout.SetCopyIfDifferent(true);
@@ -3474,7 +3476,8 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS80()
     this->LocalGenerator->GetTargetDirectory(*this->Target);
   this->ConvertToWindowsSlash(artifactDir);
   std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
-  std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
+  std::string targetNameXML =
+      cmVS10EscapeXML(this->GeneratorTarget->GetName());
 
   cmGeneratedFileStream fout(manifestFile.c_str());
   fout.SetCopyIfDifferent(true);
@@ -3526,7 +3529,8 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS81()
     this->LocalGenerator->GetTargetDirectory(*this->Target);
   this->ConvertToWindowsSlash(artifactDir);
   std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
-  std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
+  std::string targetNameXML =
+      cmVS10EscapeXML(this->GeneratorTarget->GetName());
 
   cmGeneratedFileStream fout(manifestFile.c_str());
   fout.SetCopyIfDifferent(true);
@@ -3583,7 +3587,8 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS10_0()
     this->LocalGenerator->GetTargetDirectory(*this->Target);
   this->ConvertToWindowsSlash(artifactDir);
   std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
-  std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
+  std::string targetNameXML =
+      cmVS10EscapeXML(this->GeneratorTarget->GetName());
 
   cmGeneratedFileStream fout(manifestFile.c_str());
   fout.SetCopyIfDifferent(true);

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51acf2d5770dc6af1f7d75ceca6c7254e3529abf
commit 51acf2d5770dc6af1f7d75ceca6c7254e3529abf
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 15:52:23 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 16:17:10 2015 +0200

    VS10: Use GeneratorTarget instead of Target for type checks.

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 68f8422..e63deea 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -269,7 +269,7 @@ void cmVisualStudio10TargetGenerator::WriteString(const char* line,
 void cmVisualStudio10TargetGenerator::Generate()
 {
   // do not generate external ms projects
-  if(this->Target->GetType() == cmTarget::INTERFACE_LIBRARY
+  if(this->GeneratorTarget->GetType() == cmTarget::INTERFACE_LIBRARY
       || this->GeneratorTarget->Getproperty("EXTERNAL_MSPROJECT"))
     {
     return;
@@ -278,7 +278,7 @@ void cmVisualStudio10TargetGenerator::Generate()
   this->Target->SetProperty("GENERATOR_FILE_NAME",this->Name.c_str());
   this->Target->SetProperty("GENERATOR_FILE_NAME_EXT",
                             ".vcxproj");
-  if(this->Target->GetType() <= cmTarget::OBJECT_LIBRARY)
+  if(this->GeneratorTarget->GetType() <= cmTarget::OBJECT_LIBRARY)
     {
     if(!this->ComputeClOptions())
       {
@@ -361,7 +361,8 @@ void cmVisualStudio10TargetGenerator::Generate()
   this->WriteString("<ProjectGUID>", 2);
   (*this->BuildFileStream) <<  "{" << this->GUID << "}</ProjectGUID>\n";
 
-  if(this->MSTools && this->Target->GetType() <= cmTarget::GLOBAL_TARGET)
+  if(this->MSTools
+     && this->GeneratorTarget->GetType() <= cmTarget::GLOBAL_TARGET)
     {
     this->WriteApplicationTypeSettings();
     this->VerifyNecessaryFiles();
@@ -671,7 +672,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
                                  i->c_str(),
                                  1, " Label=\"Configuration\"", "\n");
     std::string configType = "<ConfigurationType>";
-    switch(this->Target->GetType())
+    switch(this->GeneratorTarget->GetType())
       {
       case cmTarget::SHARED_LIBRARY:
       case cmTarget::MODULE_LIBRARY:
@@ -748,7 +749,7 @@ void cmVisualStudio10TargetGenerator
   mfcLine += useOfMfcValue + "</UseOfMfc>\n";
   this->WriteString(mfcLine.c_str(), 2);
 
-  if((this->Target->GetType() <= cmTarget::OBJECT_LIBRARY &&
+  if((this->GeneratorTarget->GetType() <= cmTarget::OBJECT_LIBRARY &&
       this->ClOptions[config]->UsingUnicode()) ||
      this->GeneratorTarget->GetpropertyAsBool("VS_WINRT_COMPONENT") ||
      this->GlobalGenerator->TargetsWindowsPhone() ||
@@ -757,7 +758,7 @@ void cmVisualStudio10TargetGenerator
     {
     this->WriteString("<CharacterSet>Unicode</CharacterSet>\n", 2);
     }
-  else if (this->Target->GetType() <= cmTarget::MODULE_LIBRARY &&
+  else if (this->GeneratorTarget->GetType() <= cmTarget::MODULE_LIBRARY &&
            this->ClOptions[config]->UsingSBCS())
     {
     this->WriteString("<CharacterSet>NotSet</CharacterSet>\n", 2);
@@ -1487,7 +1488,7 @@ void cmVisualStudio10TargetGenerator::WriteSources(
 
 void cmVisualStudio10TargetGenerator::WriteAllSources()
 {
-  if(this->Target->GetType() > cmTarget::UTILITY)
+  if(this->GeneratorTarget->GetType() > cmTarget::UTILITY)
     {
     return;
     }
@@ -1749,7 +1750,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
 
 void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
 {
-  cmTarget::TargetType ttype = this->Target->GetType();
+  cmTarget::TargetType ttype = this->GeneratorTarget->GetType();
   if(ttype > cmTarget::GLOBAL_TARGET)
     {
     return;
@@ -1834,8 +1835,8 @@ OutputLinkIncremental(std::string const& configName)
     }
   // static libraries and things greater than modules do not need
   // to set this option
-  if(this->Target->GetType() == cmTarget::STATIC_LIBRARY
-     || this->Target->GetType() > cmTarget::MODULE_LIBRARY)
+  if(this->GeneratorTarget->GetType() == cmTarget::STATIC_LIBRARY
+     || this->GeneratorTarget->GetType() > cmTarget::MODULE_LIBRARY)
     {
     return;
     }
@@ -1973,8 +1974,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
       {
       clOptions.AddFlag("CompileAsWinRT", "true");
       // For WinRT components, add the _WINRT_DLL define to produce a lib
-      if (this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
-          this->Target->GetType() == cmTarget::MODULE_LIBRARY )
+      if (this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY ||
+          this->GeneratorTarget->GetType() == cmTarget::MODULE_LIBRARY )
         {
         clOptions.AddDefine("_WINRT_DLL");
         }
@@ -2182,8 +2183,8 @@ WriteMasmOptions(std::string const& configName,
 void
 cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config)
 {
-  if(this->Target->GetType() != cmTarget::STATIC_LIBRARY &&
-     this->Target->GetType() != cmTarget::OBJECT_LIBRARY)
+  if(this->GeneratorTarget->GetType() != cmTarget::STATIC_LIBRARY &&
+     this->GeneratorTarget->GetType() != cmTarget::OBJECT_LIBRARY)
     {
     return;
     }
@@ -2219,9 +2220,9 @@ cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config)
 void cmVisualStudio10TargetGenerator::WriteManifestOptions(
   std::string const& config)
 {
-  if (this->Target->GetType() != cmTarget::EXECUTABLE &&
-      this->Target->GetType() != cmTarget::SHARED_LIBRARY &&
-      this->Target->GetType() != cmTarget::MODULE_LIBRARY)
+  if (this->GeneratorTarget->GetType() != cmTarget::EXECUTABLE &&
+      this->GeneratorTarget->GetType() != cmTarget::SHARED_LIBRARY &&
+      this->GeneratorTarget->GetType() != cmTarget::MODULE_LIBRARY)
     {
     return;
     }
@@ -2384,9 +2385,9 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
 //----------------------------------------------------------------------------
 bool cmVisualStudio10TargetGenerator::ComputeLinkOptions()
 {
-  if(this->Target->GetType() == cmTarget::EXECUTABLE ||
-     this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
-     this->Target->GetType() == cmTarget::MODULE_LIBRARY)
+  if(this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE ||
+     this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY ||
+     this->GeneratorTarget->GetType() == cmTarget::MODULE_LIBRARY)
     {
     for(std::vector<std::string>::const_iterator
           i = this->Configurations.begin();
@@ -2423,11 +2424,11 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
   std::string CONFIG = cmSystemTools::UpperCase(config);
 
   const char* linkType = "SHARED";
-  if(this->Target->GetType() == cmTarget::MODULE_LIBRARY)
+  if(this->GeneratorTarget->GetType() == cmTarget::MODULE_LIBRARY)
     {
     linkType = "MODULE";
     }
-  if(this->Target->GetType() == cmTarget::EXECUTABLE)
+  if(this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
     {
     linkType = "EXE";
     }
@@ -2512,7 +2513,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
   std::string targetNameFull;
   std::string targetNameImport;
   std::string targetNamePDB;
-  if(this->Target->GetType() == cmTarget::EXECUTABLE)
+  if(this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
     {
     this->GeneratorTarget->GetExecutableNames(targetName, targetNameFull,
                                      targetNameImport, targetNamePDB,
@@ -2535,7 +2536,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
       if (this->GlobalGenerator->TargetsWindowsCE())
         {
         linkOptions.AddFlag("SubSystem", "WindowsCE");
-        if (this->Target->GetType() == cmTarget::EXECUTABLE)
+        if (this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
           {
           if (this->ClOptions[config]->UsingUnicode())
             {
@@ -2557,7 +2558,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
       if (this->GlobalGenerator->TargetsWindowsCE())
         {
         linkOptions.AddFlag("SubSystem", "WindowsCE");
-        if (this->Target->GetType() == cmTarget::EXECUTABLE)
+        if (this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
           {
           if (this->ClOptions[config]->UsingUnicode())
             {
@@ -2603,7 +2604,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
     // A Windows Runtime component uses internal .NET metadata,
     // so does not have an import library.
     if(this->GeneratorTarget->GetpropertyAsBool("VS_WINRT_COMPONENT") &&
-       this->Target->GetType() != cmTarget::EXECUTABLE)
+       this->GeneratorTarget->GetType() != cmTarget::EXECUTABLE)
       {
       linkOptions.AddFlag("GenerateWindowsMetadata", "true");
       }
@@ -2641,7 +2642,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
                            "%(IgnoreSpecificDefaultLibraries)");
     }
 
-  if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
+  if (this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY &&
       this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
     {
     if (this->GeneratorTarget->GetpropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
@@ -2658,8 +2659,8 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
 void
 cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& config)
 {
-  if(this->Target->GetType() == cmTarget::STATIC_LIBRARY
-     || this->Target->GetType() > cmTarget::MODULE_LIBRARY)
+  if(this->GeneratorTarget->GetType() == cmTarget::STATIC_LIBRARY
+     || this->GeneratorTarget->GetType() > cmTarget::MODULE_LIBRARY)
     {
     return;
     }
@@ -2697,7 +2698,7 @@ void cmVisualStudio10TargetGenerator::AddLibraries(
       libVec.push_back(path);
       }
     else if (!l->Target
-        || l->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
+        || l->GeneratorTarget->GetType() != cmTarget::INTERFACE_LIBRARY)
       {
       libVec.push_back(l->Value);
       }
@@ -2769,7 +2770,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
     this->WritePlatformConfigTag("ItemDefinitionGroup", i->c_str(), 1);
     *this->BuildFileStream << "\n";
     //    output cl compile flags <ClCompile></ClCompile>
-    if(this->Target->GetType() <= cmTarget::OBJECT_LIBRARY)
+    if(this->GeneratorTarget->GetType() <= cmTarget::OBJECT_LIBRARY)
       {
       this->WriteClOptions(*i, includes);
       //    output rc compile flags <ResourceCompile></ResourceCompile>
@@ -2787,7 +2788,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
     //    output manifest flags  <Manifest></Manifest>
     this->WriteManifestOptions(*i);
     if(this->NsightTegra &&
-       this->Target->GetType() == cmTarget::EXECUTABLE &&
+       this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE &&
        this->GeneratorTarget->GetpropertyAsBool("ANDROID_GUI"))
       {
       this->WriteAntBuildOptions(*i);
@@ -2800,7 +2801,7 @@ void
 cmVisualStudio10TargetGenerator::WriteEvents(std::string const& configName)
 {
   bool addedPrelink = false;
-  if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
+  if (this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY &&
       this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
     {
     if (this->GeneratorTarget->GetpropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
@@ -3008,7 +3009,7 @@ void cmVisualStudio10TargetGenerator::WriteWinRTPackageCertificateKeyFile()
 {
   if((this->GlobalGenerator->TargetsWindowsStore() ||
       this->GlobalGenerator->TargetsWindowsPhone())
-      && (cmTarget::EXECUTABLE == this->Target->GetType()))
+      && (cmTarget::EXECUTABLE == this->GeneratorTarget->GetType()))
     {
     std::string pfxFile;
     std::vector<cmSourceFile const*> certificates;
@@ -3137,7 +3138,7 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
       this->WriteString("<MinimumVisualStudioVersion>14.0"
         "</MinimumVisualStudioVersion>\n", 2);
 
-      if(this->Target->GetType() < cmTarget::UTILITY)
+      if(this->GeneratorTarget->GetType() < cmTarget::UTILITY)
         {
         isAppContainer = true;
         }
@@ -3151,7 +3152,7 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
       this->WriteString("<MinimumVisualStudioVersion>12.0"
                         "</MinimumVisualStudioVersion>\n", 2);
 
-      if (this->Target->GetType() < cmTarget::UTILITY)
+      if (this->GeneratorTarget->GetType() < cmTarget::UTILITY)
         {
         isAppContainer = true;
         }
@@ -3165,12 +3166,13 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
       this->WriteString("<MinimumVisualStudioVersion>11.0"
                         "</MinimumVisualStudioVersion>\n", 2);
 
-      if (isWindowsStore && this->Target->GetType() < cmTarget::UTILITY)
+      if (isWindowsStore
+          && this->GeneratorTarget->GetType() < cmTarget::UTILITY)
         {
         isAppContainer = true;
         }
       else if (isWindowsPhone &&
-               this->Target->GetType() == cmTarget::EXECUTABLE)
+               this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
         {
         this->WriteString("<XapOutputs>true</XapOutputs>\n", 2);
         this->WriteString("<XapFilename>", 2);
@@ -3228,7 +3230,7 @@ void cmVisualStudio10TargetGenerator::VerifyNecessaryFiles()
 {
   // For Windows and Windows Phone executables, we will assume that if a
   // manifest is not present that we need to add all the necessary files
-  if (this->Target->GetType() == cmTarget::EXECUTABLE)
+  if (this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE)
     {
     std::vector<cmSourceFile const*> manifestSources;
     this->GeneratorTarget->GetAppManifest(manifestSources, "");

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9247dccdd01a9af71ddfdac7972cb9f8d00f4d1
commit c9247dccdd01a9af71ddfdac7972cb9f8d00f4d1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 15:51:21 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 16:17:10 2015 +0200

    VS10: Use GeneratorTarget instead of Target for property reads.

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index a4b0bc3..68f8422 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -270,7 +270,7 @@ void cmVisualStudio10TargetGenerator::Generate()
 {
   // do not generate external ms projects
   if(this->Target->GetType() == cmTarget::INTERFACE_LIBRARY
-      || this->Target->GetProperty("EXTERNAL_MSPROJECT"))
+      || this->GeneratorTarget->Getproperty("EXTERNAL_MSPROJECT"))
     {
     return;
     }
@@ -368,7 +368,7 @@ void cmVisualStudio10TargetGenerator::Generate()
     }
 
   const char* vsProjectTypes =
-    this->Target->GetProperty("VS_GLOBAL_PROJECT_TYPES");
+    this->GeneratorTarget->Getproperty("VS_GLOBAL_PROJECT_TYPES");
   if(vsProjectTypes)
     {
     this->WriteString("<ProjectTypes>", 2);
@@ -376,9 +376,12 @@ void cmVisualStudio10TargetGenerator::Generate()
       "</ProjectTypes>\n";
     }
 
-  const char* vsProjectName = this->Target->GetProperty("VS_SCC_PROJECTNAME");
-  const char* vsLocalPath = this->Target->GetProperty("VS_SCC_LOCALPATH");
-  const char* vsProvider = this->Target->GetProperty("VS_SCC_PROVIDER");
+  const char* vsProjectName =
+      this->GeneratorTarget->Getproperty("VS_SCC_PROJECTNAME");
+  const char* vsLocalPath =
+      this->GeneratorTarget->Getproperty("VS_SCC_LOCALPATH");
+  const char* vsProvider =
+      this->GeneratorTarget->Getproperty("VS_SCC_PROVIDER");
 
   if( vsProjectName && vsLocalPath && vsProvider )
     {
@@ -392,7 +395,8 @@ void cmVisualStudio10TargetGenerator::Generate()
     (*this->BuildFileStream) << cmVS10EscapeXML(vsProvider) <<
       "</SccProvider>\n";
 
-    const char* vsAuxPath = this->Target->GetProperty("VS_SCC_AUXPATH");
+    const char* vsAuxPath =
+        this->GeneratorTarget->Getproperty("VS_SCC_AUXPATH");
     if( vsAuxPath )
       {
       this->WriteString("<SccAuxPath>", 2);
@@ -401,13 +405,13 @@ void cmVisualStudio10TargetGenerator::Generate()
       }
     }
 
-  if(this->Target->GetPropertyAsBool("VS_WINRT_COMPONENT"))
+  if(this->GeneratorTarget->GetpropertyAsBool("VS_WINRT_COMPONENT"))
     {
     this->WriteString("<WinMDAssembly>true</WinMDAssembly>\n", 2);
     }
 
   const char* vsGlobalKeyword =
-    this->Target->GetProperty("VS_GLOBAL_KEYWORD");
+    this->GeneratorTarget->Getproperty("VS_GLOBAL_KEYWORD");
   if(!vsGlobalKeyword)
     {
     this->WriteString("<Keyword>Win32Proj</Keyword>\n", 2);
@@ -420,7 +424,7 @@ void cmVisualStudio10TargetGenerator::Generate()
     }
 
   const char* vsGlobalRootNamespace =
-    this->Target->GetProperty("VS_GLOBAL_ROOTNAMESPACE");
+    this->GeneratorTarget->Getproperty("VS_GLOBAL_ROOTNAMESPACE");
   if(vsGlobalRootNamespace)
     {
     this->WriteString("<RootNamespace>", 2);
@@ -431,14 +435,14 @@ void cmVisualStudio10TargetGenerator::Generate()
   this->WriteString("<Platform>", 2);
   (*this->BuildFileStream) << cmVS10EscapeXML(this->Platform)
                            << "</Platform>\n";
-  const char* projLabel = this->Target->GetProperty("PROJECT_LABEL");
+  const char* projLabel = this->GeneratorTarget->Getproperty("PROJECT_LABEL");
   if(!projLabel)
     {
     projLabel = this->Name.c_str();
     }
   this->WriteString("<ProjectName>", 2);
   (*this->BuildFileStream) << cmVS10EscapeXML(projLabel) << "</ProjectName>\n";
-  if(const char* targetFrameworkVersion = this->Target->GetProperty(
+  if(const char* targetFrameworkVersion = this->GeneratorTarget->Getproperty(
        "VS_DOTNET_TARGET_FRAMEWORK_VERSION"))
     {
     this->WriteString("<TargetFrameworkVersion>", 2);
@@ -497,7 +501,7 @@ void cmVisualStudio10TargetGenerator::WriteDotNetReferences()
 {
   std::vector<std::string> references;
   if(const char* vsDotNetReferences =
-     this->Target->GetProperty("VS_DOTNET_REFERENCES"))
+     this->GeneratorTarget->Getproperty("VS_DOTNET_REFERENCES"))
     {
     cmSystemTools::ExpandListArgument(vsDotNetReferences, references);
     }
@@ -543,7 +547,7 @@ void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup()
           i != this->Configurations.end(); ++i)
         {
         this->WritePlatformConfigTag("LogicalName", i->c_str(), 3);
-        if(this->Target->GetProperty("VS_GLOBAL_ROOTNAMESPACE"))
+        if(this->GeneratorTarget->Getproperty("VS_GLOBAL_ROOTNAMESPACE"))
           {
           (*this->BuildFileStream ) << "$(RootNamespace).";
           }
@@ -610,7 +614,7 @@ void cmVisualStudio10TargetGenerator::WriteWinRTReferences()
 {
   std::vector<std::string> references;
   if(const char* vsWinRTReferences =
-     this->Target->GetProperty("VS_WINRT_REFERENCES"))
+     this->GeneratorTarget->Getproperty("VS_WINRT_REFERENCES"))
     {
     cmSystemTools::ExpandListArgument(vsWinRTReferences, references);
     }
@@ -679,7 +683,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
         break;
       case cmTarget::EXECUTABLE:
         if(this->NsightTegra &&
-           !this->Target->GetPropertyAsBool("ANDROID_GUI"))
+           !this->GeneratorTarget->GetpropertyAsBool("ANDROID_GUI"))
           {
           // Android executables are .so too.
           configType += "DynamicLibrary";
@@ -746,10 +750,10 @@ void cmVisualStudio10TargetGenerator
 
   if((this->Target->GetType() <= cmTarget::OBJECT_LIBRARY &&
       this->ClOptions[config]->UsingUnicode()) ||
-     this->Target->GetPropertyAsBool("VS_WINRT_COMPONENT") ||
+     this->GeneratorTarget->GetpropertyAsBool("VS_WINRT_COMPONENT") ||
      this->GlobalGenerator->TargetsWindowsPhone() ||
      this->GlobalGenerator->TargetsWindowsStore() ||
-     this->Target->GetPropertyAsBool("VS_WINRT_EXTENSIONS"))
+     this->GeneratorTarget->GetpropertyAsBool("VS_WINRT_EXTENSIONS"))
     {
     this->WriteString("<CharacterSet>Unicode</CharacterSet>\n", 2);
     }
@@ -769,8 +773,8 @@ void cmVisualStudio10TargetGenerator
     pts += "</PlatformToolset>\n";
     this->WriteString(pts.c_str(), 2);
     }
-  if(this->Target->GetPropertyAsBool("VS_WINRT_COMPONENT") ||
-     this->Target->GetPropertyAsBool("VS_WINRT_EXTENSIONS"))
+  if(this->GeneratorTarget->GetpropertyAsBool("VS_WINRT_COMPONENT") ||
+     this->GeneratorTarget->GetpropertyAsBool("VS_WINRT_EXTENSIONS"))
     {
     this->WriteString("<WindowsAppContainer>true"
                       "</WindowsAppContainer>\n", 2);
@@ -788,27 +792,29 @@ void cmVisualStudio10TargetGenerator
   ntv += toolset? toolset : "Default";
   ntv += "</NdkToolchainVersion>\n";
   this->WriteString(ntv.c_str(), 2);
-  if(const char* minApi = this->Target->GetProperty("ANDROID_API_MIN"))
+  if(const char* minApi =
+     this->GeneratorTarget->Getproperty("ANDROID_API_MIN"))
     {
     this->WriteString("<AndroidMinAPI>", 2);
     (*this->BuildFileStream ) <<
       "android-" << cmVS10EscapeXML(minApi) << "</AndroidMinAPI>\n";
     }
-  if(const char* api = this->Target->GetProperty("ANDROID_API"))
+  if(const char* api = this->GeneratorTarget->Getproperty("ANDROID_API"))
     {
     this->WriteString("<AndroidTargetAPI>", 2);
     (*this->BuildFileStream ) <<
       "android-" << cmVS10EscapeXML(api) << "</AndroidTargetAPI>\n";
     }
 
-  if(const char* cpuArch = this->Target->GetProperty("ANDROID_ARCH"))
+  if(const char* cpuArch = this->GeneratorTarget->Getproperty("ANDROID_ARCH"))
     {
     this->WriteString("<AndroidArch>", 2);
     (*this->BuildFileStream) << cmVS10EscapeXML(cpuArch) <<
       "</AndroidArch>\n";
     }
 
-  if(const char* stlType = this->Target->GetProperty("ANDROID_STL_TYPE"))
+  if(const char* stlType =
+     this->GeneratorTarget->Getproperty("ANDROID_STL_TYPE"))
     {
     this->WriteString("<AndroidStlType>", 2);
     (*this->BuildFileStream) << cmVS10EscapeXML(stlType) <<
@@ -1963,7 +1969,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
   if (this->MSTools)
     {
     // If we have the VS_WINRT_COMPONENT set then force Compile as WinRT.
-    if (this->Target->GetPropertyAsBool("VS_WINRT_COMPONENT"))
+    if (this->GeneratorTarget->GetpropertyAsBool("VS_WINRT_COMPONENT"))
       {
       clOptions.AddFlag("CompileAsWinRT", "true");
       // For WinRT components, add the _WINRT_DLL define to produce a lib
@@ -2012,7 +2018,7 @@ void cmVisualStudio10TargetGenerator::WriteClOptions(
   if(this->NsightTegra)
     {
     if(const char* processMax =
-        this->Target->GetProperty("ANDROID_PROCESS_MAX"))
+        this->GeneratorTarget->Getproperty("ANDROID_PROCESS_MAX"))
       {
       this->WriteString("<ProcessMax>", 3);
       *this->BuildFileStream << cmVS10EscapeXML(processMax) <<
@@ -2270,18 +2276,18 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
     cmVS10EscapeXML(antBuildPath) << "</AntBuildPath>\n";
   }
 
-  if (this->Target->GetPropertyAsBool("ANDROID_SKIP_ANT_STEP"))
+  if (this->GeneratorTarget->GetpropertyAsBool("ANDROID_SKIP_ANT_STEP"))
     {
     this->WriteString("<SkipAntStep>true</SkipAntStep>\n", 3);
     }
 
-  if (this->Target->GetPropertyAsBool("ANDROID_PROGUARD"))
+  if (this->GeneratorTarget->GetpropertyAsBool("ANDROID_PROGUARD"))
     {
     this->WriteString("<EnableProGuard>true</EnableProGuard>\n", 3);
     }
 
   if (const char* proGuardConfigLocation =
-      this->Target->GetProperty("ANDROID_PROGUARD_CONFIG_PATH"))
+      this->GeneratorTarget->Getproperty("ANDROID_PROGUARD_CONFIG_PATH"))
     {
     this->WriteString("<ProGuardConfigLocation>", 3);
     (*this->BuildFileStream) << cmVS10EscapeXML(proGuardConfigLocation) <<
@@ -2289,7 +2295,7 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
     }
 
   if (const char* securePropertiesLocation =
-      this->Target->GetProperty("ANDROID_SECURE_PROPS_PATH"))
+      this->GeneratorTarget->Getproperty("ANDROID_SECURE_PROPS_PATH"))
     {
     this->WriteString("<SecurePropertiesLocation>", 3);
     (*this->BuildFileStream) << cmVS10EscapeXML(securePropertiesLocation) <<
@@ -2297,7 +2303,7 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
     }
 
   if (const char* nativeLibDirectoriesExpression =
-      this->Target->GetProperty("ANDROID_NATIVE_LIB_DIRECTORIES"))
+      this->GeneratorTarget->Getproperty("ANDROID_NATIVE_LIB_DIRECTORIES"))
     {
     cmGeneratorExpression ge;
     cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
@@ -2309,7 +2315,7 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
     }
 
   if (const char* nativeLibDependenciesExpression =
-      this->Target->GetProperty("ANDROID_NATIVE_LIB_DEPENDENCIES"))
+      this->GeneratorTarget->Getproperty("ANDROID_NATIVE_LIB_DEPENDENCIES"))
     {
     cmGeneratorExpression ge;
     cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
@@ -2321,7 +2327,7 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
     }
 
   if (const char* javaSourceDir =
-      this->Target->GetProperty("ANDROID_JAVA_SOURCE_DIR"))
+      this->GeneratorTarget->Getproperty("ANDROID_JAVA_SOURCE_DIR"))
     {
     this->WriteString("<JavaSourceDir>", 3);
     (*this->BuildFileStream) << cmVS10EscapeXML(javaSourceDir) <<
@@ -2329,7 +2335,7 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
     }
 
   if (const char* jarDirectoriesExpression =
-      this->Target->GetProperty("ANDROID_JAR_DIRECTORIES"))
+      this->GeneratorTarget->Getproperty("ANDROID_JAR_DIRECTORIES"))
     {
     cmGeneratorExpression ge;
     cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
@@ -2341,7 +2347,7 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
     }
 
   if (const char* jarDeps =
-      this->Target->GetProperty("ANDROID_JAR_DEPENDENCIES"))
+      this->GeneratorTarget->Getproperty("ANDROID_JAR_DEPENDENCIES"))
     {
     this->WriteString("<JarDependencies>", 3);
     (*this->BuildFileStream) << cmVS10EscapeXML(jarDeps) <<
@@ -2349,7 +2355,7 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
     }
 
   if (const char* assetsDirectories =
-      this->Target->GetProperty("ANDROID_ASSETS_DIRECTORIES"))
+      this->GeneratorTarget->Getproperty("ANDROID_ASSETS_DIRECTORIES"))
     {
     this->WriteString("<AssetsDirectories>", 3);
     (*this->BuildFileStream) << cmVS10EscapeXML(assetsDirectories) <<
@@ -2365,7 +2371,7 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
   }
 
   if (const char* antAdditionalOptions =
-      this->Target->GetProperty("ANDROID_ANT_ADDITIONAL_OPTIONS"))
+      this->GeneratorTarget->Getproperty("ANDROID_ANT_ADDITIONAL_OPTIONS"))
     {
     this->WriteString("<AdditionalOptions>", 3);
     (*this->BuildFileStream) << cmVS10EscapeXML(antAdditionalOptions) <<
@@ -2436,7 +2442,8 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
   flags += " ";
   flags += this->
     Target->GetMakefile()->GetRequiredDefinition(linkFlagVar.c_str());
-  const char* targetLinkFlags = this->Target->GetProperty("LINK_FLAGS");
+  const char* targetLinkFlags =
+      this->GeneratorTarget->Getproperty("LINK_FLAGS");
   if(targetLinkFlags)
     {
     flags += " ";
@@ -2444,7 +2451,8 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
     }
   std::string flagsProp = "LINK_FLAGS_";
   flagsProp += CONFIG;
-  if(const char* flagsConfig = this->Target->GetProperty(flagsProp.c_str()))
+  if(const char* flagsConfig =
+     this->GeneratorTarget->Getproperty(flagsProp.c_str()))
     {
     flags += " ";
     flags += flagsConfig;
@@ -2522,7 +2530,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
     {
     linkOptions.AddFlag("Version", "");
 
-    if ( this->Target->GetPropertyAsBool("WIN32_EXECUTABLE") )
+    if ( this->GeneratorTarget->GetpropertyAsBool("WIN32_EXECUTABLE") )
       {
       if (this->GlobalGenerator->TargetsWindowsCE())
         {
@@ -2594,7 +2602,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
 
     // A Windows Runtime component uses internal .NET metadata,
     // so does not have an import library.
-    if(this->Target->GetPropertyAsBool("VS_WINRT_COMPONENT") &&
+    if(this->GeneratorTarget->GetpropertyAsBool("VS_WINRT_COMPONENT") &&
        this->Target->GetType() != cmTarget::EXECUTABLE)
       {
       linkOptions.AddFlag("GenerateWindowsMetadata", "true");
@@ -2636,7 +2644,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
   if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
       this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
     {
-    if (this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
+    if (this->GeneratorTarget->GetpropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
       {
       linkOptions.AddFlag("ModuleDefinitionFile", "$(IntDir)exportall.def");
       }
@@ -2780,7 +2788,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
     this->WriteManifestOptions(*i);
     if(this->NsightTegra &&
        this->Target->GetType() == cmTarget::EXECUTABLE &&
-       this->Target->GetPropertyAsBool("ANDROID_GUI"))
+       this->GeneratorTarget->GetpropertyAsBool("ANDROID_GUI"))
       {
       this->WriteAntBuildOptions(*i);
       }
@@ -2795,7 +2803,7 @@ cmVisualStudio10TargetGenerator::WriteEvents(std::string const& configName)
   if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
       this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
     {
-    if (this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
+    if (this->GeneratorTarget->GetpropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
       {
       addedPrelink = true;
       std::vector<cmCustomCommand> commands =
@@ -2908,14 +2916,14 @@ void cmVisualStudio10TargetGenerator::WritePlatformExtensions()
       cmHasLiteralPrefix(this->GlobalGenerator->GetSystemVersion(), "10.0"))
     {
     const char* desktopExtensionsVersion =
-      this->Target->GetProperty("VS_DESKTOP_EXTENSIONS_VERSION");
+      this->GeneratorTarget->Getproperty("VS_DESKTOP_EXTENSIONS_VERSION");
     if (desktopExtensionsVersion)
       {
       this->WriteSinglePlatformExtension("WindowsDesktop",
                                          desktopExtensionsVersion);
       }
     const char* mobileExtensionsVersion =
-      this->Target->GetProperty("VS_MOBILE_EXTENSIONS_VERSION");
+      this->GeneratorTarget->Getproperty("VS_MOBILE_EXTENSIONS_VERSION");
     if (mobileExtensionsVersion)
       {
       this->WriteSinglePlatformExtension("WindowsMobile",
@@ -2955,11 +2963,11 @@ void cmVisualStudio10TargetGenerator::WriteSDKReferences()
       cmHasLiteralPrefix(this->GlobalGenerator->GetSystemVersion(), "10.0"))
     {
     const char* desktopExtensionsVersion =
-      this->Target->GetProperty("VS_DESKTOP_EXTENSIONS_VERSION");
+      this->GeneratorTarget->Getproperty("VS_DESKTOP_EXTENSIONS_VERSION");
     const char* mobileExtensionsVersion =
-      this->Target->GetProperty("VS_MOBILE_EXTENSIONS_VERSION");
+      this->GeneratorTarget->Getproperty("VS_MOBILE_EXTENSIONS_VERSION");
     const char* iotExtensionsVersion =
-      this->Target->GetProperty("VS_IOT_EXTENSIONS_VERSION");
+      this->GeneratorTarget->Getproperty("VS_IOT_EXTENSIONS_VERSION");
 
     if(desktopExtensionsVersion || mobileExtensionsVersion ||
        iotExtensionsVersion)
@@ -3190,7 +3198,8 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
       "</WindowsTargetPlatformVersion>\n";
     }
   const char* targetPlatformMinVersion =
-      this->Target->GetProperty("VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION");
+      this->GeneratorTarget
+      ->Getproperty("VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION");
   if(targetPlatformMinVersion)
     {
     this->WriteString("<WindowsTargetPlatformMinVersion>", 2);
@@ -3209,7 +3218,7 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
     }
 
   // Added IoT Startup Task support
-  if(this->Target->GetPropertyAsBool("VS_IOT_STARTUP_TASK"))
+  if(this->GeneratorTarget->GetpropertyAsBool("VS_IOT_STARTUP_TASK"))
     {
     this->WriteString("<ContainsStartupTask>true</ContainsStartupTask>\n", 2);
     }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb3d49dd2b6f7c95682a28a87dbb1206cc02b70e
commit bb3d49dd2b6f7c95682a28a87dbb1206cc02b70e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 13:56:36 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 10 16:17:10 2015 +0200

    cmTarget: Move link type enum out.
    
    Remove a reason for generate time code to depend on the cmTarget header/type.

diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 7da334e..b0d98e9 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -373,13 +373,13 @@ void CCONV cmAddLinkLibraryForTarget(void *arg, const char *tgt,
   switch (libtype)
     {
     case CM_LIBRARY_GENERAL:
-      mf->AddLinkLibraryForTarget(tgt,value, cmTarget::GENERAL);
+      mf->AddLinkLibraryForTarget(tgt,value, GENERAL_LibraryType);
       break;
     case CM_LIBRARY_DEBUG:
-      mf->AddLinkLibraryForTarget(tgt,value, cmTarget::DEBUG);
+      mf->AddLinkLibraryForTarget(tgt,value, DEBUG_LibraryType);
       break;
     case CM_LIBRARY_OPTIMIZED:
-      mf->AddLinkLibraryForTarget(tgt,value, cmTarget::OPTIMIZED);
+      mf->AddLinkLibraryForTarget(tgt,value, OPTIMIZED_LibraryType);
       break;
     }
 }
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 22843f1..742651a 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -482,24 +482,24 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
 
   // Look for entries meant for this configuration.
   std::vector<cmLinkItem> actual_libs;
-  cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
+  cmTargetLinkLibraryType llt = GENERAL_LibraryType;
   bool haveLLT = false;
   for(std::vector<std::string>::const_iterator di = deplist.begin();
       di != deplist.end(); ++di)
     {
     if(*di == "debug")
       {
-      llt = cmTarget::DEBUG;
+      llt = DEBUG_LibraryType;
       haveLLT = true;
       }
     else if(*di == "optimized")
       {
-      llt = cmTarget::OPTIMIZED;
+      llt = OPTIMIZED_LibraryType;
       haveLLT = true;
       }
     else if(*di == "general")
       {
-      llt = cmTarget::GENERAL;
+      llt = GENERAL_LibraryType;
       haveLLT = true;
       }
     else if(!di->empty())
@@ -517,17 +517,17 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
           {
           if(strcmp(val, "debug") == 0)
             {
-            llt = cmTarget::DEBUG;
+            llt = DEBUG_LibraryType;
             }
           else if(strcmp(val, "optimized") == 0)
             {
-            llt = cmTarget::OPTIMIZED;
+            llt = OPTIMIZED_LibraryType;
             }
           }
         }
 
       // If the library is meant for this link type then use it.
-      if(llt == cmTarget::GENERAL || llt == this->LinkType)
+      if(llt == GENERAL_LibraryType || llt == this->LinkType)
         {
         cmLinkItem item(*di, this->FindTargetToLink(depender_index, *di));
         actual_libs.push_back(item);
@@ -539,7 +539,7 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
         }
 
       // Reset the link type until another explicit type is given.
-      llt = cmTarget::GENERAL;
+      llt = GENERAL_LibraryType;
       haveLLT = false;
       }
     }
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index 9d960c6..de1e24c 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -157,7 +157,7 @@ private:
   void CheckWrongConfigItem(cmLinkItem const& item);
 
   int ComponentOrderId;
-  cmTarget::LinkLibraryType LinkType;
+  cmTargetLinkLibraryType LinkType;
   bool HasConfig;
   bool DebugMode;
   bool OldLinkDirMode;
diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx
index fde8fb1..0ef2ea5 100644
--- a/Source/cmExportLibraryDependenciesCommand.cxx
+++ b/Source/cmExportLibraryDependenciesCommand.cxx
@@ -120,15 +120,15 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
         std::string ltValue;
         switch(li->second)
           {
-          case cmTarget::GENERAL:
+          case GENERAL_LibraryType:
             valueNew += "general;";
             ltValue = "general";
             break;
-          case cmTarget::DEBUG:
+          case DEBUG_LibraryType:
             valueNew += "debug;";
             ltValue = "debug";
             break;
-          case cmTarget::OPTIMIZED:
+          case OPTIMIZED_LibraryType:
             valueNew += "optimized;";
             ltValue = "optimized";
             break;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index f33a9e1..67ad9cf 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5416,13 +5416,13 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
                                 this->MaxLanguageStandards);
     }
 
-  cmTarget::LinkLibraryType linkType = this->Target->ComputeLinkType(config);
+  cmTargetLinkLibraryType linkType = this->Target->ComputeLinkType(config);
   cmTarget::LinkLibraryVectorType const& oldllibs =
     this->Target->GetOriginalLinkLibraries();
   for(cmTarget::LinkLibraryVectorType::const_iterator li = oldllibs.begin();
       li != oldllibs.end(); ++li)
     {
-    if(li->second != cmTarget::GENERAL && li->second != linkType)
+    if(li->second != GENERAL_LibraryType && li->second != linkType)
       {
       std::string name = this->Target->CheckCMP0004(li->first);
       if(name == this->GetName() || name.empty())
diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx
index 996b538..eb3bfce 100644
--- a/Source/cmLinkLibrariesCommand.cxx
+++ b/Source/cmLinkLibrariesCommand.cxx
@@ -34,7 +34,7 @@ bool cmLinkLibrariesCommand
         return false;
         }
       this->Makefile->AddLinkLibrary(*i,
-                                 cmTarget::DEBUG);
+                                 DEBUG_LibraryType);
       }
     else if (*i == "optimized")
       {
@@ -46,7 +46,7 @@ bool cmLinkLibrariesCommand
         return false;
         }
       this->Makefile->AddLinkLibrary(*i,
-                                 cmTarget::OPTIMIZED);
+                                 OPTIMIZED_LibraryType);
       }
     else
       {
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 862ab2d..319a658 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -1145,7 +1145,7 @@ void cmLocalVisualStudio6Generator
       libDebug =
         this->ConvertToOutputFormat(libDebug.c_str(), SHELL);
 
-      if (j->second == cmTarget::GENERAL)
+      if (j->second == GENERAL_LibraryType)
         {
         libOptions += " ";
         libOptions += lib;
@@ -1156,7 +1156,7 @@ void cmLocalVisualStudio6Generator
         libMultiLineOptionsForDebug +=  libDebug;
         libMultiLineOptionsForDebug += "\n";
         }
-      if (j->second == cmTarget::DEBUG)
+      if (j->second == DEBUG_LibraryType)
         {
         libDebugOptions += " ";
         libDebugOptions += lib;
@@ -1165,7 +1165,7 @@ void cmLocalVisualStudio6Generator
         libMultiLineDebugOptions += libDebug;
         libMultiLineDebugOptions += "\n";
         }
-      if (j->second == cmTarget::OPTIMIZED)
+      if (j->second == OPTIMIZED_LibraryType)
         {
         libOptimizedOptions += " ";
         libOptimizedOptions += lib;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c060505..9c046d2 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1415,7 +1415,7 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove)
 }
 
 void cmMakefile::AddLinkLibrary(const std::string& lib,
-                                cmTarget::LinkLibraryType llt)
+                                cmTargetLinkLibraryType llt)
 {
   cmTarget::LibraryID tmp;
   tmp.first = lib;
@@ -1425,7 +1425,7 @@ void cmMakefile::AddLinkLibrary(const std::string& lib,
 
 void cmMakefile::AddLinkLibraryForTarget(const std::string& target,
                                          const std::string& lib,
-                                         cmTarget::LinkLibraryType llt)
+                                         cmTargetLinkLibraryType llt)
 {
   cmTargets::iterator i = this->Targets.find(target);
   if ( i != this->Targets.end())
@@ -1486,7 +1486,7 @@ void cmMakefile::AddLinkDirectoryForTarget(const std::string& target,
 
 void cmMakefile::AddLinkLibrary(const std::string& lib)
 {
-  this->AddLinkLibrary(lib,cmTarget::GENERAL);
+  this->AddLinkLibrary(lib,GENERAL_LibraryType);
 }
 
 void cmMakefile::InitializeFromParent(cmMakefile* parent)
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 459d34c..bc795b6 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -219,9 +219,9 @@ public:
    * Add a link library to the build.
    */
   void AddLinkLibrary(const std::string&);
-  void AddLinkLibrary(const std::string&, cmTarget::LinkLibraryType type);
+  void AddLinkLibrary(const std::string&, cmTargetLinkLibraryType type);
   void AddLinkLibraryForTarget(const std::string& tgt, const std::string&,
-                               cmTarget::LinkLibraryType type);
+                               cmTargetLinkLibraryType type);
   void AddLinkDirectoryForTarget(const std::string& tgt, const std::string& d);
 
   /**
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index 468a589..dd8fa9c 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -123,4 +123,10 @@ static thisClass* SafeDownCast(cmObject *c) \
 } \
 class cmTypeMacro_UseTrailingSemicolon
 
+enum cmTargetLinkLibraryType {
+  GENERAL_LibraryType,
+  DEBUG_LibraryType,
+  OPTIMIZED_LibraryType
+};
+
 #endif
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 847a5c1..0128c78 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -632,13 +632,13 @@ const std::vector<std::string>& cmTarget::GetLinkDirectories() const
 }
 
 //----------------------------------------------------------------------------
-cmTarget::LinkLibraryType cmTarget::ComputeLinkType(
+cmTargetLinkLibraryType cmTarget::ComputeLinkType(
                                       const std::string& config) const
 {
   // No configuration is always optimized.
   if(config.empty())
     {
-    return cmTarget::OPTIMIZED;
+    return OPTIMIZED_LibraryType;
     }
 
   // Get the list of configurations considered to be DEBUG.
@@ -650,10 +650,10 @@ cmTarget::LinkLibraryType cmTarget::ComputeLinkType(
   if (std::find(debugConfigs.begin(), debugConfigs.end(), configUpper) !=
       debugConfigs.end())
     {
-    return cmTarget::DEBUG;
+    return DEBUG_LibraryType;
     }
   // The current configuration is not a debug configuration.
-  return cmTarget::OPTIMIZED;
+  return OPTIMIZED_LibraryType;
 }
 
 //----------------------------------------------------------------------------
@@ -693,9 +693,9 @@ bool cmTarget::NameResolvesToFramework(const std::string& libname) const
 
 //----------------------------------------------------------------------------
 std::string cmTarget::GetDebugGeneratorExpressions(const std::string &value,
-                                  cmTarget::LinkLibraryType llt) const
+                                  cmTargetLinkLibraryType llt) const
 {
-  if (llt == GENERAL)
+  if (llt == GENERAL_LibraryType)
     {
     return value;
     }
@@ -716,7 +716,7 @@ std::string cmTarget::GetDebugGeneratorExpressions(const std::string &value,
     configString = "$<OR:" + configString + ">";
     }
 
-  if (llt == OPTIMIZED)
+  if (llt == OPTIMIZED_LibraryType)
     {
     configString = "$<NOT:" + configString + ">";
     }
@@ -773,15 +773,16 @@ void cmTarget::GetTllSignatureTraces(std::ostringstream &s,
 void cmTarget::AddLinkLibrary(cmMakefile& mf,
                               const std::string& target,
                               const std::string& lib,
-                              LinkLibraryType llt)
+                              cmTargetLinkLibraryType llt)
 {
   cmTarget *tgt = this->Makefile->FindTargetToUse(lib);
   {
   const bool isNonImportedTarget = tgt && !tgt->IsImported();
 
-  const std::string libName = (isNonImportedTarget && llt != GENERAL)
-                                                        ? targetNameGenex(lib)
-                                                        : lib;
+  const std::string libName =
+      (isNonImportedTarget && llt != GENERAL_LibraryType)
+      ? targetNameGenex(lib)
+      : lib;
   this->AppendProperty("LINK_LIBRARIES",
                        this->GetDebugGeneratorExpressions(libName,
                                                           llt).c_str());
@@ -822,13 +823,13 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
       }
     switch (llt)
       {
-      case cmTarget::GENERAL:
+      case GENERAL_LibraryType:
         dependencies += "general";
         break;
-      case cmTarget::DEBUG:
+      case DEBUG_LibraryType:
         dependencies += "debug";
         break;
-      case cmTarget::OPTIMIZED:
+      case OPTIMIZED_LibraryType:
         dependencies += "optimized";
         break;
       }
@@ -1162,7 +1163,7 @@ void cmTarget::GatherDependenciesForVS6( const cmMakefile& mf,
 
     // Parse the dependency information, which is a set of
     // type, library pairs separated by ";". There is always a trailing ";".
-    cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
+    cmTargetLinkLibraryType llt = GENERAL_LibraryType;
     std::string depline = deps;
     std::string::size_type start = 0;
     std::string::size_type end;
@@ -1174,22 +1175,22 @@ void cmTarget::GatherDependenciesForVS6( const cmMakefile& mf,
         {
         if (l == "debug")
           {
-          llt = cmTarget::DEBUG;
+          llt = DEBUG_LibraryType;
           }
         else if (l == "optimized")
           {
-          llt = cmTarget::OPTIMIZED;
+          llt = OPTIMIZED_LibraryType;
           }
         else if (l == "general")
           {
-          llt = cmTarget::GENERAL;
+          llt = GENERAL_LibraryType;
           }
         else
           {
           LibraryID lib2(l,llt);
           this->InsertDependencyForVS6( dep_map, lib, lib2);
           this->GatherDependenciesForVS6( mf, lib2, dep_map);
-          llt = cmTarget::GENERAL;
+          llt = GENERAL_LibraryType;
           }
         }
       start = end+1; // skip the ;
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 97515a7..b0d5f4a 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -140,17 +140,15 @@ public:
   cmSourceFile* AddSourceCMP0049(const std::string& src);
   cmSourceFile* AddSource(const std::string& src);
 
-  enum LinkLibraryType {GENERAL, DEBUG, OPTIMIZED};
-
   //* how we identify a library, by name and type
-  typedef std::pair<std::string, LinkLibraryType> LibraryID;
+  typedef std::pair<std::string, cmTargetLinkLibraryType> LibraryID;
 
   typedef std::vector<LibraryID > LinkLibraryVectorType;
   const LinkLibraryVectorType &GetOriginalLinkLibraries() const
     {return this->OriginalLinkLibraries;}
 
   /** Compute the link type to use for the given configuration.  */
-  LinkLibraryType ComputeLinkType(const std::string& config) const;
+  cmTargetLinkLibraryType ComputeLinkType(const std::string& config) const;
 
   /**
    * Clear the dependency information recorded for this target, if any.
@@ -161,7 +159,7 @@ public:
   bool NameResolvesToFramework(const std::string& libname) const;
   void AddLinkLibrary(cmMakefile& mf,
                       const std::string& target, const std::string& lib,
-                      LinkLibraryType llt);
+                      cmTargetLinkLibraryType llt);
   enum TLLSignature {
     KeywordTLLSignature,
     PlainTLLSignature
@@ -297,7 +295,7 @@ public:
   void AppendBuildInterfaceIncludes();
 
   std::string GetDebugGeneratorExpressions(const std::string &value,
-                                  cmTarget::LinkLibraryType llt) const;
+                                  cmTargetLinkLibraryType llt) const;
 
   void AddSystemIncludeDirectories(const std::set<std::string> &incs);
   std::set<std::string> const & GetSystemIncludeDirectories() const
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index b57b921..1a1cf39 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -136,7 +136,7 @@ bool cmTargetLinkLibrariesCommand
     }
 
   // Keep track of link configuration specifiers.
-  cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
+  cmTargetLinkLibraryType llt = GENERAL_LibraryType;
   bool haveLLT = false;
 
   // Start with primary linking and switch to link interface
@@ -242,27 +242,27 @@ bool cmTargetLinkLibrariesCommand
       {
       if(haveLLT)
         {
-        this->LinkLibraryTypeSpecifierWarning(llt, cmTarget::DEBUG);
+        this->LinkLibraryTypeSpecifierWarning(llt, DEBUG_LibraryType);
         }
-      llt = cmTarget::DEBUG;
+      llt = DEBUG_LibraryType;
       haveLLT = true;
       }
     else if(args[i] == "optimized")
       {
       if(haveLLT)
         {
-        this->LinkLibraryTypeSpecifierWarning(llt, cmTarget::OPTIMIZED);
+        this->LinkLibraryTypeSpecifierWarning(llt, OPTIMIZED_LibraryType);
         }
-      llt = cmTarget::OPTIMIZED;
+      llt = OPTIMIZED_LibraryType;
       haveLLT = true;
       }
     else if(args[i] == "general")
       {
       if(haveLLT)
         {
-        this->LinkLibraryTypeSpecifierWarning(llt, cmTarget::GENERAL);
+        this->LinkLibraryTypeSpecifierWarning(llt, GENERAL_LibraryType);
         }
-      llt = cmTarget::GENERAL;
+      llt = GENERAL_LibraryType;
       haveLLT = true;
       }
     else if(haveLLT)
@@ -282,7 +282,7 @@ bool cmTargetLinkLibrariesCommand
       // specifed that a library is both debug and optimized.  (this check is
       // only there for backwards compatibility when mixing projects built
       // with old versions of CMake and new)
-      llt = cmTarget::GENERAL;
+      llt = GENERAL_LibraryType;
       std::string linkType = args[0];
       linkType += "_LINK_TYPE";
       const char* linkTypeString =
@@ -291,11 +291,11 @@ bool cmTargetLinkLibrariesCommand
         {
         if(strcmp(linkTypeString, "debug") == 0)
           {
-          llt = cmTarget::DEBUG;
+          llt = DEBUG_LibraryType;
           }
         if(strcmp(linkTypeString, "optimized") == 0)
           {
-          llt = cmTarget::OPTIMIZED;
+          llt = OPTIMIZED_LibraryType;
           }
         }
       if (!this->HandleLibrary(args[i], llt))
@@ -350,7 +350,7 @@ cmTargetLinkLibrariesCommand
 //----------------------------------------------------------------------------
 bool
 cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
-                                            cmTarget::LinkLibraryType llt)
+                                            cmTargetLinkLibraryType llt)
 {
   if(this->Target->GetType() == cmTarget::INTERFACE_LIBRARY
       && this->CurrentProcessingState != ProcessingKeywordLinkInterface)
@@ -469,7 +469,7 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
   std::string prop;
 
   // Include this library in the link interface for the target.
-  if(llt == cmTarget::DEBUG || llt == cmTarget::GENERAL)
+  if(llt == DEBUG_LibraryType || llt == GENERAL_LibraryType)
     {
     // Put in the DEBUG configuration interfaces.
     for(std::vector<std::string>::const_iterator i = debugConfigs.begin();
@@ -480,7 +480,7 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
       this->Target->AppendProperty(prop, lib.c_str());
       }
     }
-  if(llt == cmTarget::OPTIMIZED || llt == cmTarget::GENERAL)
+  if(llt == OPTIMIZED_LibraryType || llt == GENERAL_LibraryType)
     {
     // Put in the non-DEBUG configuration interfaces.
     this->Target->AppendProperty("LINK_INTERFACE_LIBRARIES", lib.c_str());
diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h
index 47dd8bd..f061e6d 100644
--- a/Source/cmTargetLinkLibrariesCommand.h
+++ b/Source/cmTargetLinkLibrariesCommand.h
@@ -62,7 +62,7 @@ private:
 
   ProcessingState CurrentProcessingState;
 
-  bool HandleLibrary(const std::string& lib, cmTarget::LinkLibraryType llt);
+  bool HandleLibrary(const std::string& lib, cmTargetLinkLibraryType llt);
 };
 
 
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index fececfd..2d5e724 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -477,7 +477,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
             ++libIt)
       {
       mf->AddLinkLibraryForTarget(targetName, *libIt,
-                                  cmTarget::GENERAL);
+                                  GENERAL_LibraryType);
       }
 
 

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list