[Cmake-commits] CMake branch, next, updated. v3.6.0-rc1-143-g7e7dd8b

Brad King brad.king at kitware.com
Wed Jun 8 16:19:27 EDT 2016


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  7e7dd8ba118242cb86a944d130b91f7464028499 (commit)
       via  b0d3e693f1ab466451c7a0d17bbbdd3cae76e93a (commit)
      from  19eb5feb9d2e7e3b33b3402b1e5fb0c80560e647 (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=7e7dd8ba118242cb86a944d130b91f7464028499
commit 7e7dd8ba118242cb86a944d130b91f7464028499
Merge: 19eb5fe b0d3e69
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jun 8 16:19:25 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jun 8 16:19:25 2016 -0400

    Merge topic 'refactor-cmLocalGenerator-flags' into next
    
    b0d3e693 cmLocalGenerator: Pass configuration to GetTargetFlags


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0d3e693f1ab466451c7a0d17bbbdd3cae76e93a
commit b0d3e693f1ab466451c7a0d17bbbdd3cae76e93a
Author:     Tobias Hunger <tobias.hunger at qt.io>
AuthorDate: Tue Jun 7 16:30:58 2016 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jun 8 16:18:31 2016 -0400

    cmLocalGenerator: Pass configuration to GetTargetFlags
    
    Move the configuration lookup to call sites.  This will allow
    multi-configuration callers to use the method.

diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 8565fdb..3d35114 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -371,7 +371,7 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries(
     bool useWatcomQuote =
       this->Makefile->IsOn(createRule + "_USE_WATCOM_QUOTE");
     this->LocalGenerator->GetTargetFlags(
-      linkLibraries, flags, linkFlags, frameworkPath, linkPath,
+      config, linkLibraries, flags, linkFlags, frameworkPath, linkPath,
       this->GeneratorTarget, useWatcomQuote);
     linkFlags = cmSystemTools::TrimWhitespace(linkFlags);
 
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index b748b9c..b369420 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1152,13 +1152,11 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags,
 }
 
 void cmLocalGenerator::GetTargetFlags(
-  std::string& linkLibs, std::string& flags, std::string& linkFlags,
-  std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target,
-  bool useWatcomQuote)
+  const std::string& config, std::string& linkLibs, std::string& flags,
+  std::string& linkFlags, std::string& frameworkPath, std::string& linkPath,
+  cmGeneratorTarget* target, bool useWatcomQuote)
 {
-  std::string buildType =
-    this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
-  buildType = cmSystemTools::UpperCase(buildType);
+  const std::string buildType = cmSystemTools::UpperCase(config);
   const char* libraryLinkVariable =
     "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library
 
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 5c603a6..5ced648 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -308,10 +308,10 @@ public:
 
   /** Fill out these strings for the given target.  Libraries to link,
    *  flags, and linkflags. */
-  void GetTargetFlags(std::string& linkLibs, std::string& flags,
-                      std::string& linkFlags, std::string& frameworkPath,
-                      std::string& linkPath, cmGeneratorTarget* target,
-                      bool useWatcomQuote);
+  void GetTargetFlags(const std::string& config, std::string& linkLibs,
+                      std::string& flags, std::string& linkFlags,
+                      std::string& frameworkPath, std::string& linkPath,
+                      cmGeneratorTarget* target, bool useWatcomQuote);
 
   virtual void ComputeObjectFilenames(
     std::map<cmSourceFile const*, std::string>& mapping,
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 3e91545..60eb904 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -434,9 +434,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
   vars["TARGET_FILE"] =
     localGen.ConvertToOutputFormat(targetOutputReal, cmOutputConverter::SHELL);
 
-  localGen.GetTargetFlags(vars["LINK_LIBRARIES"], vars["FLAGS"],
-                          vars["LINK_FLAGS"], frameworkPath, linkPath,
-                          &genTarget, useWatcomQuote);
+  localGen.GetTargetFlags(this->GetConfigName(), vars["LINK_LIBRARIES"],
+                          vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath,
+                          linkPath, &genTarget, useWatcomQuote);
   if (this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") &&
       gt.GetType() == cmState::SHARED_LIBRARY) {
     if (gt.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) {
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 89ea955..f35939b 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -482,6 +482,9 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
       mf->AddLinkLibraryForTarget(targetName, *libIt, GENERAL_LibraryType);
     }
 
+    std::string buildType = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
+    buildType = cmSystemTools::UpperCase(buildType);
+
     std::string linkLibs;
     std::string frameworkPath;
     std::string linkPath;
@@ -490,8 +493,8 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
     gg->CreateGenerationObjects();
     cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName());
     cmLocalGenerator* lg = gtgt->GetLocalGenerator();
-    lg->GetTargetFlags(linkLibs, frameworkPath, linkPath, flags, linkFlags,
-                       gtgt, false);
+    lg->GetTargetFlags(buildType, linkLibs, frameworkPath, linkPath, flags,
+                       linkFlags, gtgt, false);
     linkLibs = frameworkPath + linkPath + linkLibs;
 
     printf("%s\n", linkLibs.c_str());

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

Summary of changes:
 Source/cmGhsMultiTargetGenerator.cxx    |    2 +-
 Source/cmLocalGenerator.cxx             |   10 ++++------
 Source/cmLocalGenerator.h               |    8 ++++----
 Source/cmNinjaNormalTargetGenerator.cxx |    6 +++---
 Source/cmake.cxx                        |    7 +++++--
 5 files changed, 17 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list