[Cmake-commits] CMake branch, next, updated. v3.6.0-rc1-116-gcdc2c6a

Brad King brad.king at kitware.com
Wed Jun 8 08:57:53 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  cdc2c6a7a48b66f043a832d0417a1475b53cb63f (commit)
       via  cc1e6e0201104624db1adf736f7c8a2519c98a3b (commit)
      from  9b3bbc0720dc2482a8d8b7af7840eb287df2777b (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=cdc2c6a7a48b66f043a832d0417a1475b53cb63f
commit cdc2c6a7a48b66f043a832d0417a1475b53cb63f
Merge: 9b3bbc0 cc1e6e0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jun 8 08:57:52 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jun 8 08:57:52 2016 -0400

    Merge topic 'GetTargetFlags-multi-config' into next
    
    cc1e6e02 Revert "cmLocalGenerator: Pass configuration to GetTargetFlags"


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc1e6e0201104624db1adf736f7c8a2519c98a3b
commit cc1e6e0201104624db1adf736f7c8a2519c98a3b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jun 8 08:56:39 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jun 8 08:56:39 2016 -0400

    Revert "cmLocalGenerator: Pass configuration to GetTargetFlags"
    
    This reverts commit fe0d2241ca04bbb3ddf28a2dc45f3cec60902f1c.

diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 3d35114..8565fdb 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(
-      config, linkLibraries, flags, linkFlags, frameworkPath, linkPath,
+      linkLibraries, flags, linkFlags, frameworkPath, linkPath,
       this->GeneratorTarget, useWatcomQuote);
     linkFlags = cmSystemTools::TrimWhitespace(linkFlags);
 
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index e4454ed..b748b9c 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1152,33 +1152,36 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags,
 }
 
 void cmLocalGenerator::GetTargetFlags(
-  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& 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 char* libraryLinkVariable =
     "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library
 
   switch (target->GetType()) {
     case cmState::STATIC_LIBRARY:
-      this->GetStaticLibraryFlags(linkFlags, config, target);
+      this->GetStaticLibraryFlags(linkFlags, buildType, target);
       break;
     case cmState::MODULE_LIBRARY:
       libraryLinkVariable = "CMAKE_MODULE_LINKER_FLAGS";
     case cmState::SHARED_LIBRARY: {
       linkFlags = this->Makefile->GetSafeDefinition(libraryLinkVariable);
       linkFlags += " ";
-      if (!config.empty()) {
+      if (!buildType.empty()) {
         std::string build = libraryLinkVariable;
         build += "_";
-        build += config;
+        build += buildType;
         linkFlags += this->Makefile->GetSafeDefinition(build);
         linkFlags += " ";
       }
       if (this->Makefile->IsOn("WIN32") &&
           !(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW"))) {
         std::vector<cmSourceFile*> sources;
-        target->GetSourceFiles(sources, config);
+        target->GetSourceFiles(sources, buildType);
         for (std::vector<cmSourceFile*>::const_iterator i = sources.begin();
              i != sources.end(); ++i) {
           cmSourceFile* sf = *i;
@@ -1195,9 +1198,9 @@ void cmLocalGenerator::GetTargetFlags(
         linkFlags += targetLinkFlags;
         linkFlags += " ";
       }
-      if (!config.empty()) {
+      if (!buildType.empty()) {
         std::string configLinkFlags = "LINK_FLAGS_";
-        configLinkFlags += config;
+        configLinkFlags += buildType;
         targetLinkFlags = target->GetProperty(configLinkFlags);
         if (targetLinkFlags) {
           linkFlags += targetLinkFlags;
@@ -1210,20 +1213,20 @@ void cmLocalGenerator::GetTargetFlags(
     case cmState::EXECUTABLE: {
       linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS");
       linkFlags += " ";
-      if (!config.empty()) {
+      if (!buildType.empty()) {
         std::string build = "CMAKE_EXE_LINKER_FLAGS_";
-        build += config;
+        build += buildType;
         linkFlags += this->Makefile->GetSafeDefinition(build);
         linkFlags += " ";
       }
-      std::string linkLanguage = target->GetLinkerLanguage(config);
+      std::string linkLanguage = target->GetLinkerLanguage(buildType);
       if (linkLanguage.empty()) {
         cmSystemTools::Error(
           "CMake can not determine linker language for target: ",
           target->GetName().c_str());
         return;
       }
-      this->AddLanguageFlags(flags, linkLanguage, config);
+      this->AddLanguageFlags(flags, linkLanguage, buildType);
       this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath, *target,
                                 false, false, useWatcomQuote);
       if (cmSystemTools::IsOn(
@@ -1255,9 +1258,9 @@ void cmLocalGenerator::GetTargetFlags(
         linkFlags += targetLinkFlags;
         linkFlags += " ";
       }
-      if (!config.empty()) {
+      if (!buildType.empty()) {
         std::string configLinkFlags = "LINK_FLAGS_";
-        configLinkFlags += config;
+        configLinkFlags += buildType;
         targetLinkFlags = target->GetProperty(configLinkFlags);
         if (targetLinkFlags) {
           linkFlags += targetLinkFlags;
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 5ced648..5c603a6 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(const std::string& config, std::string& linkLibs,
-                      std::string& flags, std::string& linkFlags,
-                      std::string& frameworkPath, std::string& linkPath,
-                      cmGeneratorTarget* target, bool useWatcomQuote);
+  void GetTargetFlags(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 60eb904..3e91545 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(this->GetConfigName(), vars["LINK_LIBRARIES"],
-                          vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath,
-                          linkPath, &genTarget, useWatcomQuote);
+  localGen.GetTargetFlags(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 f35939b..89ea955 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -482,9 +482,6 @@ 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;
@@ -493,8 +490,8 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
     gg->CreateGenerationObjects();
     cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName());
     cmLocalGenerator* lg = gtgt->GetLocalGenerator();
-    lg->GetTargetFlags(buildType, linkLibs, frameworkPath, linkPath, flags,
-                       linkFlags, gtgt, false);
+    lg->GetTargetFlags(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             |   33 +++++++++++++++++--------------
 Source/cmLocalGenerator.h               |    8 ++++----
 Source/cmNinjaNormalTargetGenerator.cxx |    6 +++---
 Source/cmake.cxx                        |    7 ++-----
 5 files changed, 28 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list