[Cmake-commits] CMake branch, next, updated. v3.0.0-rc5-3277-gcc80e18

Brad King brad.king at kitware.com
Wed May 21 09:54:28 EDT 2014


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  cc80e1826779631e183b6b11e4672b1d87a9fc95 (commit)
       via  b6e2e0d194c41cfff7dc8677dd411d5ea061602b (commit)
       via  5d12b87b9d505b8c9d0d4363e33636078c7510e7 (commit)
       via  c2eeb08b06d422c7b72aa9e6431e6e7584ce8c74 (commit)
       via  f7654a07d5156c5f2899884949108dbe815563ce (commit)
      from  359b1be39a766605f4809aa5d197705a73bbb5da (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc80e1826779631e183b6b11e4672b1d87a9fc95
commit cc80e1826779631e183b6b11e4672b1d87a9fc95
Merge: 359b1be b6e2e0d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 21 09:54:27 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 21 09:54:27 2014 -0400

    Merge topic 'ninja-intel-ipo' into next
    
    b6e2e0d1 Ninja: Fix Intel interprocedural optimization with static libraries
    5d12b87b cmGeneratorTarget: Improve GetCreateRuleVariable API
    c2eeb08b cmTarget: Add GetFeatureAsBool method
    f7654a07 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b6e2e0d194c41cfff7dc8677dd411d5ea061602b
commit b6e2e0d194c41cfff7dc8677dd411d5ea061602b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 21 09:40:30 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 21 09:49:14 2014 -0400

    Ninja: Fix Intel interprocedural optimization with static libraries
    
    Teach cmGeneratorTarget::GetCreateRuleVariable about the IPO variant.
    Return the static library IPO rule when the feature is enabled.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 20f2d96..153c611 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -945,12 +945,24 @@ void cmGeneratorTarget::GetAppleArchs(const std::string& config,
 //----------------------------------------------------------------------------
 std::string
 cmGeneratorTarget::GetCreateRuleVariable(std::string const& lang,
-                                         std::string const&) const
+                                         std::string const& config) const
 {
   switch(this->GetType())
     {
     case cmTarget::STATIC_LIBRARY:
-      return "CMAKE_" + lang + "_CREATE_STATIC_LIBRARY";
+      {
+      std::string var = "CMAKE_" + lang + "_CREATE_STATIC_LIBRARY";
+      if(this->Target->GetFeatureAsBool(
+           "INTERPROCEDURAL_OPTIMIZATION", config))
+        {
+        std::string varIPO = var + "_IPO";
+        if(this->Makefile->GetDefinition(varIPO))
+          {
+          return varIPO;
+          }
+        }
+      return var;
+      }
     case cmTarget::SHARED_LIBRARY:
       return "CMAKE_" + lang + "_CREATE_SHARED_LIBRARY";
     case cmTarget::MODULE_LIBRARY:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d12b87b9d505b8c9d0d4363e33636078c7510e7
commit 5d12b87b9d505b8c9d0d4363e33636078c7510e7
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 21 09:38:24 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 21 09:38:24 2014 -0400

    cmGeneratorTarget: Improve GetCreateRuleVariable API
    
    Pass the language and configuration to the method so it can return the
    complete rule variable name.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index ec5ce9e..20f2d96 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -943,18 +943,20 @@ void cmGeneratorTarget::GetAppleArchs(const std::string& config,
 }
 
 //----------------------------------------------------------------------------
-const char* cmGeneratorTarget::GetCreateRuleVariable() const
+std::string
+cmGeneratorTarget::GetCreateRuleVariable(std::string const& lang,
+                                         std::string const&) const
 {
   switch(this->GetType())
     {
     case cmTarget::STATIC_LIBRARY:
-      return "_CREATE_STATIC_LIBRARY";
+      return "CMAKE_" + lang + "_CREATE_STATIC_LIBRARY";
     case cmTarget::SHARED_LIBRARY:
-      return "_CREATE_SHARED_LIBRARY";
+      return "CMAKE_" + lang + "_CREATE_SHARED_LIBRARY";
     case cmTarget::MODULE_LIBRARY:
-      return "_CREATE_SHARED_MODULE";
+      return "CMAKE_" + lang + "_CREATE_SHARED_MODULE";
     case cmTarget::EXECUTABLE:
-      return "_LINK_EXECUTABLE";
+      return "CMAKE_" + lang + "_LINK_EXECUTABLE";
     default:
       break;
     }
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 9d13e6c..29aa410 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -75,9 +75,9 @@ public:
   void GetAppleArchs(const std::string& config,
                      std::vector<std::string>& archVec) const;
 
-  ///! Return the rule variable used to create this type of target,
-  //  need to add CMAKE_(LANG) for full name.
-  const char* GetCreateRuleVariable() const;
+  /** Return the rule variable used to create this type of target.  */
+  std::string GetCreateRuleVariable(std::string const& lang,
+                                    std::string const& config) const;
 
   /** Get the include directories for this target.  */
   std::vector<std::string> GetIncludeDirectories(
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index a6ad714..dac95ff 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -657,10 +657,10 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang,
 {
   std::string objs;
   std::vector<std::string> objVector;
+  std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
   // Add all the sources outputs to the depends of the target
   std::vector<cmSourceFile*> classes;
-  target.GetSourceFiles(classes,
-                      this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
+  target.GetSourceFiles(classes, config);
   for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
       i != classes.end(); ++i)
     {
@@ -686,9 +686,7 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang,
         }
       }
     }
-  std::string createRule = "CMAKE_";
-  createRule += llang;
-  createRule += target.GetCreateRuleVariable();
+  std::string createRule = target.GetCreateRuleVariable(llang, config);
   bool useWatcomQuote = this->Makefile->IsOn(createRule+"_USE_WATCOM_QUOTE");
   std::string targetName = target.Target->GetFullName();
   // Executable :
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index b467d22..cfcf9f4 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -314,9 +314,8 @@ cmNinjaNormalTargetGenerator
   std::vector<std::string> linkCmds;
   cmMakefile* mf = this->GetMakefile();
   {
-  std::string linkCmdVar = "CMAKE_";
-  linkCmdVar += this->TargetLinkLanguage;
-  linkCmdVar += this->GetGeneratorTarget()->GetCreateRuleVariable();
+  std::string linkCmdVar = this->GetGeneratorTarget()
+    ->GetCreateRuleVariable(this->TargetLinkLanguage, this->GetConfigName());
   const char *linkCmd = mf->GetDefinition(linkCmdVar);
   if (linkCmd)
     {
@@ -451,8 +450,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
   std::string linkPath;
   cmGeneratorTarget& genTarget = *this->GetGeneratorTarget();
 
-  std::string createRule = "CMAKE_";
-  createRule += this->TargetLinkLanguage + genTarget.GetCreateRuleVariable();
+  std::string createRule =
+    genTarget.GetCreateRuleVariable(this->TargetLinkLanguage,
+                                    this->GetConfigName());
   bool useWatcomQuote = mf->IsOn(createRule+"_USE_WATCOM_QUOTE");
   cmLocalNinjaGenerator& localGen = *this->GetLocalGenerator();
   localGen.GetTargetFlags(vars["LINK_LIBRARIES"],

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2eeb08b06d422c7b72aa9e6431e6e7584ce8c74
commit c2eeb08b06d422c7b72aa9e6431e6e7584ce8c74
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 21 09:34:32 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 21 09:38:22 2014 -0400

    cmTarget: Add GetFeatureAsBool method
    
    Return the GetFeature method result converted to a boolean value.

diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 73d24a9..a08d731 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -2105,7 +2105,7 @@ const char* cmMakefileTargetGenerator::GetFeature(const std::string& feature)
 //----------------------------------------------------------------------------
 bool cmMakefileTargetGenerator::GetFeatureAsBool(const std::string& feature)
 {
-  return cmSystemTools::IsOn(this->GetFeature(feature));
+  return this->Target->GetFeatureAsBool(feature, this->ConfigName);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 54e398c..c3b4c75 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -105,7 +105,7 @@ const char* cmNinjaTargetGenerator::GetFeature(const std::string& feature)
 // TODO: Picked up from cmMakefileTargetGenerator.  Refactor it.
 bool cmNinjaTargetGenerator::GetFeatureAsBool(const std::string& feature)
 {
-  return cmSystemTools::IsOn(this->GetFeature(feature));
+  return this->Target->GetFeatureAsBool(feature, this->GetConfigName());
 }
 
 // TODO: Picked up from cmMakefileTargetGenerator.  Refactor it.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 86842a4..d8b7373 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3181,6 +3181,13 @@ const char* cmTarget::GetFeature(const std::string& feature,
 }
 
 //----------------------------------------------------------------------------
+bool cmTarget::GetFeatureAsBool(const std::string& feature,
+                                const std::string& config) const
+{
+  return cmSystemTools::IsOn(this->GetFeature(feature, config));
+}
+
+//----------------------------------------------------------------------------
 bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const
 {
   if (this->IsImported())
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index bee6b34..93e1b5b 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -237,6 +237,8 @@ public:
 
   const char* GetFeature(const std::string& feature,
                          const std::string& config) const;
+  bool GetFeatureAsBool(const std::string& feature,
+                        const std::string& config) const;
 
   bool IsImported() const {return this->IsImportedTarget;}
 

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

Summary of changes:
 Source/CMakeVersion.cmake               |    2 +-
 Source/cmGeneratorTarget.cxx            |   24 +++++++++++++++++++-----
 Source/cmGeneratorTarget.h              |    6 +++---
 Source/cmLocalGenerator.cxx             |    8 +++-----
 Source/cmMakefileTargetGenerator.cxx    |    2 +-
 Source/cmNinjaNormalTargetGenerator.cxx |   10 +++++-----
 Source/cmNinjaTargetGenerator.cxx       |    2 +-
 Source/cmTarget.cxx                     |    7 +++++++
 Source/cmTarget.h                       |    2 ++
 9 files changed, 42 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list