[Cmake-commits] CMake branch, next, updated. v3.4.0-rc1-349-ga3bf276

Stephen Kelly steveire at gmail.com
Sat Oct 10 07:15:01 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  a3bf276785818646050d9e396072cd129bff668c (commit)
       via  a05e0b90295216ae5fd94501c4dcec19a3bf5678 (commit)
      from  de7a02a918f46ae89148ccbb835d4c44e7b74048 (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=a3bf276785818646050d9e396072cd129bff668c
commit a3bf276785818646050d9e396072cd129bff668c
Merge: de7a02a a05e0b9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 10 07:14:59 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Oct 10 07:14:59 2015 -0400

    Merge topic 'use-generator-target' into next
    
    a05e0b90 cmCommonTargetGenerator: Use GeneratorTarget more.


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

    cmCommonTargetGenerator: Use GeneratorTarget more.

diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index f901414..24d0e61 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -109,7 +109,7 @@ std::string cmCommonTargetGenerator::ComputeFortranModuleDirectory() const
 {
   std::string mod_dir;
   const char* target_mod_dir =
-    this->Target->GetProperty("Fortran_MODULE_DIRECTORY");
+    this->GeneratorTarget->GetProperty("Fortran_MODULE_DIRECTORY");
   const char* moddir_flag =
     this->Makefile->GetDefinition("CMAKE_Fortran_MODDIR_FLAG");
   if(target_mod_dir && moddir_flag)
@@ -214,7 +214,7 @@ cmCommonTargetGenerator
     this->LocalGenerator->GetFortranFormat(srcfmt);
   if(format == cmLocalGenerator::FortranFormatNone)
     {
-    const char* tgtfmt = this->Target->GetProperty("Fortran_FORMAT");
+    const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT");
     format = this->LocalGenerator->GetFortranFormat(tgtfmt);
     }
   const char* var = 0;
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 2d2de5f..76ef8cc 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -168,7 +168,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
   if(linkLanguage.empty())
     {
     cmSystemTools::Error("Cannot determine link language for target \"",
-                         this->Target->GetName().c_str(), "\".");
+                         this->GeneratorTarget->GetName().c_str(), "\".");
     return;
     }
 
@@ -197,7 +197,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
                            this->ConfigName);
 
 
-  if(this->Target->GetPropertyAsBool("WIN32_EXECUTABLE"))
+  if(this->GeneratorTarget->GetPropertyAsBool("WIN32_EXECUTABLE"))
     {
     this->LocalGenerator->AppendFlags
       (linkFlags, this->Makefile->GetDefinition("CMAKE_CREATE_WIN32_EXE"));
@@ -226,11 +226,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
 
   // Add target-specific linker flags.
   this->LocalGenerator->AppendFlags
-    (linkFlags, this->Target->GetProperty("LINK_FLAGS"));
+    (linkFlags, this->GeneratorTarget->GetProperty("LINK_FLAGS"));
   std::string linkFlagsConfig = "LINK_FLAGS_";
   linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
   this->LocalGenerator->AppendFlags
-    (linkFlags, this->Target->GetProperty(linkFlagsConfig));
+    (linkFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig));
 
   this->AddModuleDefinitionFlag(linkFlags);
 
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 8b60a23..5e5eeab 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -26,7 +26,7 @@ cmMakefileLibraryTargetGenerator
   cmMakefileTargetGenerator(target)
 {
   this->CustomCommandDriver = OnDepends;
-  if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
+  if (this->GeneratorTarget->GetType() != cmTarget::INTERFACE_LIBRARY)
     {
     this->GeneratorTarget->GetLibraryNames(
       this->TargetNameOut, this->TargetNameSO, this->TargetNameReal,
@@ -62,7 +62,7 @@ void cmMakefileLibraryTargetGenerator::WriteRuleFiles()
 
   // write the link rules
   // Write the rule for this target type.
-  switch(this->Target->GetType())
+  switch(this->GeneratorTarget->GetType())
     {
     case cmTarget::STATIC_LIBRARY:
       this->WriteStaticLibraryRules();
@@ -122,11 +122,11 @@ void cmMakefileLibraryTargetGenerator::WriteObjectLibraryRules()
 
   // Write the rule.
   this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
-                                      this->Target->GetName(),
+                                      this->GeneratorTarget->GetName(),
                                       depends, commands, true);
 
   // Write the main driver rule to build everything in this target.
-  this->WriteTargetDriverRule(this->Target->GetName(), false);
+  this->WriteTargetDriverRule(this->GeneratorTarget->GetName(), false);
 }
 
 //----------------------------------------------------------------------------
@@ -166,11 +166,11 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink)
 
   std::string extraFlags;
   this->LocalGenerator->AppendFlags
-    (extraFlags, this->Target->GetProperty("LINK_FLAGS"));
+    (extraFlags, this->GeneratorTarget->GetProperty("LINK_FLAGS"));
   std::string linkFlagsConfig = "LINK_FLAGS_";
   linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
   this->LocalGenerator->AppendFlags
-    (extraFlags, this->Target->GetProperty(linkFlagsConfig));
+    (extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig));
 
   this->LocalGenerator->AddConfigVariableFlags
     (extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName);
@@ -190,11 +190,11 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink)
 
   std::string extraFlags;
   this->LocalGenerator->AppendFlags(extraFlags,
-                                    this->Target->GetProperty("LINK_FLAGS"));
+                           this->GeneratorTarget->GetProperty("LINK_FLAGS"));
   std::string linkFlagsConfig = "LINK_FLAGS_";
   linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
   this->LocalGenerator->AppendFlags
-    (extraFlags, this->Target->GetProperty(linkFlagsConfig));
+    (extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig));
   this->LocalGenerator->AddConfigVariableFlags
     (extraFlags, "CMAKE_MODULE_LINKER_FLAGS", this->ConfigName);
   this->AddModuleDefinitionFlag(extraFlags);
@@ -213,11 +213,11 @@ void cmMakefileLibraryTargetGenerator::WriteFrameworkRules(bool relink)
 
   std::string extraFlags;
   this->LocalGenerator->AppendFlags(extraFlags,
-                                    this->Target->GetProperty("LINK_FLAGS"));
+                             this->GeneratorTarget->GetProperty("LINK_FLAGS"));
   std::string linkFlagsConfig = "LINK_FLAGS_";
   linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
   this->LocalGenerator->AppendFlags
-    (extraFlags, this->Target->GetProperty(linkFlagsConfig));
+    (extraFlags, this->GeneratorTarget->GetProperty(linkFlagsConfig));
   this->LocalGenerator->AddConfigVariableFlags
     (extraFlags, "CMAKE_MACOSX_FRAMEWORK_LINKER_FLAGS", this->ConfigName);
 
@@ -244,7 +244,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
   if(linkLanguage.empty())
     {
     cmSystemTools::Error("Cannot determine link language for target \"",
-                         this->Target->GetName().c_str(), "\".");
+                         this->GeneratorTarget->GetName().c_str(), "\".");
     return;
     }
 
@@ -253,8 +253,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
   this->LocalGenerator->AppendFlags(linkFlags, extraFlags);
 
   // Add OSX version flags, if any.
-  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)
     {
     this->AppendOSXVerFlag(linkFlags, linkLanguage, "COMPATIBILITY", true);
     this->AppendOSXVerFlag(linkFlags, linkLanguage, "CURRENT", false);
@@ -351,7 +351,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
     // Add the link message.
     std::string buildEcho = "Linking ";
     buildEcho += linkLanguage;
-    switch(this->Target->GetType())
+    switch(this->GeneratorTarget->GetType())
       {
       case cmTarget::STATIC_LIBRARY:
         buildEcho += " static library ";
@@ -375,7 +375,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
     }
 
   const char* forbiddenFlagVar = 0;
-  switch(this->Target->GetType())
+  switch(this->GeneratorTarget->GetType())
     {
     case cmTarget::SHARED_LIBRARY:
       forbiddenFlagVar = "_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS";
@@ -441,7 +441,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
   std::vector<std::string> commands1;
   // Add a command to remove any existing files for this library.
   // for static libs only
-  if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
+  if(this->GeneratorTarget->GetType() == cmTarget::STATIC_LIBRARY)
     {
     this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles,
                                              *this->Target, "target");
@@ -497,7 +497,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
   std::vector<std::string> archiveAppendCommands;
   std::vector<std::string> archiveFinishCommands;
   std::string::size_type archiveCommandLimit = std::string::npos;
-  if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
+  if(this->GeneratorTarget->GetType() == cmTarget::STATIC_LIBRARY)
     {
     haveStaticLibraryRule =
       this->Makefile->GetDefinition(linkRuleVar)? true:false;
@@ -552,7 +552,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
 
   // Collect up flags to link in needed libraries.
   std::string linkLibs;
-  if(this->Target->GetType() != cmTarget::STATIC_LIBRARY)
+  if(this->GeneratorTarget->GetType() != cmTarget::STATIC_LIBRARY)
     {
     this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends,
                          useWatcomQuote);
@@ -566,15 +566,15 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
                           useWatcomQuote);
 
   // maybe create .def file from list of objects
-  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->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
+    if(this->GeneratorTarget->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
       {
       std::string name_of_def_file =
         this->GeneratorTarget->GetSupportDirectory();
       name_of_def_file += std::string("/") +
-        this->Target->GetName();
+        this->GeneratorTarget->GetName();
       name_of_def_file += ".def";
       std::string cmd = cmSystemTools::GetCMakeCommand();
       cmd = this->Convert(cmd, cmLocalGenerator::NONE,
@@ -667,7 +667,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
 
   // Compute the directory portion of the install_name setting.
   std::string install_name_dir;
-  if(this->Target->GetType() == cmTarget::SHARED_LIBRARY)
+  if(this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY)
     {
     // Get the install_name directory for the build tree.
     install_name_dir =
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 0ce13c3..8534986 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -245,7 +245,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
     // Write an empty dependency file.
     cmGeneratedFileStream depFileStream(dependFileNameFull.c_str());
     depFileStream
-      << "# Empty dependencies file for " << this->Target->GetName() << ".\n"
+      << "# Empty dependencies file for "
+      << this->GeneratorTarget->GetName() << ".\n"
       << "# This may be replaced when dependencies are built." << std::endl;
     }
 
diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx
index 303ca63..18594bb 100644
--- a/Source/cmMakefileUtilityTargetGenerator.cxx
+++ b/Source/cmMakefileUtilityTargetGenerator.cxx
@@ -42,7 +42,8 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
   this->CreateRuleFile();
 
   *this->BuildFileStream
-    << "# Utility rule file for " << this->Target->GetName() << ".\n\n";
+    << "# Utility rule file for "
+    << this->GeneratorTarget->GetName() << ".\n\n";
 
   if(!this->NoRuleMessages)
     {
@@ -101,11 +102,11 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
 
   // Write the rule.
   this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
-                                      this->Target->GetName(),
+                                      this->GeneratorTarget->GetName(),
                                       depends, commands, true);
 
   // Write the main driver rule to build everything in this target.
-  this->WriteTargetDriverRule(this->Target->GetName(), false);
+  this->WriteTargetDriverRule(this->GeneratorTarget->GetName(), false);
 
   // Write clean target
   this->WriteTargetCleanRules();
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index db7cd7d..fd9a158 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -93,7 +93,7 @@ std::string cmNinjaTargetGenerator::LanguageCompilerRule(
   const std::string& lang) const
 {
   return lang + "_COMPILER__" +
-    cmGlobalNinjaGenerator::EncodeRuleName(this->Target->GetName());
+    cmGlobalNinjaGenerator::EncodeRuleName(this->GeneratorTarget->GetName());
 }
 
 std::string
@@ -190,8 +190,8 @@ ComputeDefines(cmSourceFile const* source, const std::string& language)
 cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const
 {
   // Static libraries never depend on other targets for linking.
-  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 cmNinjaDeps();
 
   cmComputeLinkInformation* cli =
@@ -219,7 +219,8 @@ cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const
     }
 
   // Add user-specified dependencies.
-  if (const char* linkDepends = this->Target->GetProperty("LINK_DEPENDS"))
+  if (const char* linkDepends =
+      this->GeneratorTarget->GetProperty("LINK_DEPENDS"))
     {
     std::vector<std::string> linkDeps;
     cmSystemTools::ExpandListArgument(linkDepends, linkDeps);
@@ -272,7 +273,7 @@ cmNinjaTargetGenerator
 
 std::string cmNinjaTargetGenerator::GetTargetName() const
 {
-  return this->Target->GetName();
+  return this->GeneratorTarget->GetName();
 }
 
 
@@ -284,10 +285,10 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
     {
     std::string pdbPath;
     std::string compilePdbPath;
-    if(this->Target->GetType() == cmTarget::EXECUTABLE ||
-       this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
-       this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
-       this->Target->GetType() == cmTarget::MODULE_LIBRARY)
+    if(this->GeneratorTarget->GetType() == cmTarget::EXECUTABLE ||
+       this->GeneratorTarget->GetType() == cmTarget::STATIC_LIBRARY ||
+       this->GeneratorTarget->GetType() == cmTarget::SHARED_LIBRARY ||
+       this->GeneratorTarget->GetType() == cmTarget::MODULE_LIBRARY)
       {
       pdbPath = this->GeneratorTarget->GetPDBDirectory(this->GetConfigName());
       pdbPath += "/";
@@ -411,7 +412,7 @@ cmNinjaTargetGenerator
   if (!compileCmds.empty() && (lang == "C" || lang == "CXX"))
     {
     std::string const iwyu_prop = lang + "_INCLUDE_WHAT_YOU_USE";
-    const char *iwyu = this->Target->GetProperty(iwyu_prop);
+    const char *iwyu = this->GeneratorTarget->GetProperty(iwyu_prop);
     if (iwyu && *iwyu)
       {
       std::string run_iwyu =
@@ -428,7 +429,7 @@ cmNinjaTargetGenerator
   if (!compileCmds.empty() && (lang == "C" || lang == "CXX"))
     {
     std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER";
-    const char *clauncher = this->Target->GetProperty(clauncher_prop);
+    const char *clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
     if (clauncher && *clauncher)
       {
       std::vector<std::string> launcher_cmd;

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

Summary of changes:
 Source/cmCommonTargetGenerator.cxx             |    4 +--
 Source/cmMakefileExecutableTargetGenerator.cxx |    8 ++---
 Source/cmMakefileLibraryTargetGenerator.cxx    |   44 ++++++++++++------------
 Source/cmMakefileTargetGenerator.cxx           |    3 +-
 Source/cmMakefileUtilityTargetGenerator.cxx    |    7 ++--
 Source/cmNinjaTargetGenerator.cxx              |   23 +++++++------
 6 files changed, 46 insertions(+), 43 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list