[Cmake-commits] CMake branch, next, updated. v3.3.0-rc1-173-g01066f3

Stephen Kelly steveire at gmail.com
Sat Jun 6 09:58:00 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  01066f3643a68ed4bb67504f3809f1c82e6e3cea (commit)
       via  f573bd22e4049746b53789fc0502cff8423dbe56 (commit)
       via  ccbc2259137fe61a770bb0b5538a20bf5e00bc8f (commit)
       via  50a1bd3df13d47167d55fb1584b2c1bc7235884b (commit)
      from  a8dcd688efb9b9fbeb0fdcb57dd0818a1542d621 (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=01066f3643a68ed4bb67504f3809f1c82e6e3cea
commit 01066f3643a68ed4bb67504f3809f1c82e6e3cea
Merge: a8dcd68 f573bd2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:57:58 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Jun 6 09:57:58 2015 -0400

    Merge topic 'move-Feature-API' into next
    
    f573bd22 cmLocalGenerator: Add Feature API from cmMakefile.
    ccbc2259 cmGeneratorTarget: Move Feature API from cmTarget.
    50a1bd3d CMake Nightly Date Stamp

diff --cc Source/cmMakefile.h
index 670afa2,a601067..b348c80
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@@ -715,12 -723,10 +715,9 @@@ public
    void AppendProperty(const std::string& prop, const char *value,
                        bool asString=false);
    const char *GetProperty(const std::string& prop) const;
 -  const char *GetProperty(const std::string& prop,
 -                          cmProperty::ScopeType scope) const;
 +  const char *GetProperty(const std::string& prop, bool chain) const;
    bool GetPropertyAsBool(const std::string& prop) const;
  
-   const char* GetFeature(const std::string& feature,
-                          const std::string& config);
- 
    // Get the properties
    cmPropertyMap &GetProperties() { return this->Properties; }
  

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f573bd22e4049746b53789fc0502cff8423dbe56
commit f573bd22e4049746b53789fc0502cff8423dbe56
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 15:42:31 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jun 6 15:44:17 2015 +0200

    cmLocalGenerator: Add Feature API from cmMakefile.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 4901820..67d0d54 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -370,7 +370,7 @@ const char* cmGeneratorTarget::GetFeature(const std::string& feature,
     {
     return value;
     }
-  return this->Makefile->GetFeature(feature, config);
+  return this->LocalGenerator->GetFeature(feature, config);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index da95a4d..899da56 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2573,6 +2573,33 @@ void cmLocalGenerator::AppendFeatureOptions(
 }
 
 //----------------------------------------------------------------------------
+const char* cmLocalGenerator::GetFeature(const std::string& feature,
+                                         const std::string& config)
+{
+  // TODO: Define accumulation policy for features (prepend, append, replace).
+  // Currently we always replace.
+  if(!config.empty())
+    {
+    std::string featureConfig = feature;
+    featureConfig += "_";
+    featureConfig += cmSystemTools::UpperCase(config);
+    if(const char* value = this->Makefile->GetProperty(featureConfig))
+      {
+      return value;
+      }
+    }
+  if(const char* value = this->Makefile->GetProperty(feature))
+    {
+    return value;
+    }
+  if(cmLocalGenerator* parent = this->GetParent())
+    {
+    return parent->GetFeature(feature, config);
+    }
+  return 0;
+}
+
+//----------------------------------------------------------------------------
 std::string
 cmLocalGenerator::ConstructComment(cmCustomCommandGenerator const& ccg,
                                    const char* default_comment)
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 1359dd6..3e3b4bc 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -179,6 +179,9 @@ public:
   void AppendFeatureOptions(std::string& flags, const std::string& lang,
                             const char* feature);
 
+  const char* GetFeature(const std::string& feature,
+                         const std::string& config);
+
   /** \brief Get absolute path to dependency \a name
    *
    * Translate a dependency as given in CMake code to the name to
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b5d976a..806dc52 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4215,33 +4215,6 @@ bool cmMakefile::GetPropertyAsBool(const std::string& prop) const
   return cmSystemTools::IsOn(this->GetProperty(prop));
 }
 
-//----------------------------------------------------------------------------
-const char* cmMakefile::GetFeature(const std::string& feature,
-                                   const std::string& config)
-{
-  // TODO: Define accumulation policy for features (prepend, append, replace).
-  // Currently we always replace.
-  if(!config.empty())
-    {
-    std::string featureConfig = feature;
-    featureConfig += "_";
-    featureConfig += cmSystemTools::UpperCase(config);
-    if(const char* value = this->GetProperty(featureConfig))
-      {
-      return value;
-      }
-    }
-  if(const char* value = this->GetProperty(feature))
-    {
-    return value;
-    }
-  if(cmLocalGenerator* parent = this->LocalGenerator->GetParent())
-    {
-    return parent->GetMakefile()->GetFeature(feature, config);
-    }
-  return 0;
-}
-
 cmTarget* cmMakefile::FindTarget(const std::string& name,
                                  bool excludeAliases) const
 {
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 431ed08..a601067 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -727,9 +727,6 @@ public:
                           cmProperty::ScopeType scope) const;
   bool GetPropertyAsBool(const std::string& prop) const;
 
-  const char* GetFeature(const std::string& feature,
-                         const std::string& config);
-
   // Get the properties
   cmPropertyMap &GetProperties() { return this->Properties; }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccbc2259137fe61a770bb0b5538a20bf5e00bc8f
commit ccbc2259137fe61a770bb0b5538a20bf5e00bc8f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 15:40:26 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jun 6 15:44:16 2015 +0200

    cmGeneratorTarget: Move Feature API from cmTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index e2b8c45..4901820 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -353,6 +353,34 @@ void cmGeneratorTarget::ComputeObjectMapping()
 }
 
 //----------------------------------------------------------------------------
+const char* cmGeneratorTarget::GetFeature(const std::string& feature,
+                                          const std::string& config) const
+{
+  if(!config.empty())
+    {
+    std::string featureConfig = feature;
+    featureConfig += "_";
+    featureConfig += cmSystemTools::UpperCase(config);
+    if(const char* value = this->Target->GetProperty(featureConfig))
+      {
+      return value;
+      }
+    }
+  if(const char* value = this->Target->GetProperty(feature))
+    {
+    return value;
+    }
+  return this->Makefile->GetFeature(feature, config);
+}
+
+//----------------------------------------------------------------------------
+bool cmGeneratorTarget::GetFeatureAsBool(const std::string& feature,
+                                         const std::string& config) const
+{
+  return cmSystemTools::IsOn(this->GetFeature(feature, config));
+}
+
+//----------------------------------------------------------------------------
 const std::string& cmGeneratorTarget::GetObjectName(cmSourceFile const* file)
 {
   this->ComputeObjectMapping();
@@ -983,7 +1011,7 @@ cmGeneratorTarget::GetCreateRuleVariable(std::string const& lang,
     case cmTarget::STATIC_LIBRARY:
       {
       std::string var = "CMAKE_" + lang + "_CREATE_STATIC_LIBRARY";
-      if(this->Target->GetFeatureAsBool(
+      if(this->GetFeatureAsBool(
            "INTERPROCEDURAL_OPTIMIZATION", config))
         {
         std::string varIPO = var + "_IPO";
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index c79aa72..a8edcb8 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -67,6 +67,11 @@ public:
 
   void ComputeObjectMapping();
 
+  const char* GetFeature(const std::string& feature,
+                         const std::string& config) const;
+  bool GetFeatureAsBool(const std::string& feature,
+                        const std::string& config) const;
+
   cmTarget* Target;
   cmMakefile* Makefile;
   cmLocalGenerator* LocalGenerator;
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index a242046..f2d58ec 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -1023,12 +1023,13 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
     {
     return activeConfigs;
     }
+  cmGeneratorTarget* gt = this->GetGeneratorTarget(target);
   // inspect EXCLUDE_FROM_DEFAULT_BUILD[_<CONFIG>] properties
   for(std::vector<std::string>::const_iterator i = configs.begin();
       i != configs.end(); ++i)
     {
     const char* propertyValue =
-      target->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i->c_str());
+      gt->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i->c_str());
     if(cmSystemTools::IsOff(propertyValue))
       {
       activeConfigs.insert(*i);
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 9ac9ddb..b2a10a6 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -2086,13 +2086,13 @@ void cmMakefileTargetGenerator::AddModuleDefinitionFlag(std::string& flags)
 //----------------------------------------------------------------------------
 const char* cmMakefileTargetGenerator::GetFeature(const std::string& feature)
 {
-  return this->Target->GetFeature(feature, this->ConfigName);
+  return this->GeneratorTarget->GetFeature(feature, this->ConfigName);
 }
 
 //----------------------------------------------------------------------------
 bool cmMakefileTargetGenerator::GetFeatureAsBool(const std::string& feature)
 {
-  return this->Target->GetFeatureAsBool(feature, this->ConfigName);
+  return this->GeneratorTarget->GetFeatureAsBool(feature, this->ConfigName);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 879d6b7..b2aef68 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -107,13 +107,14 @@ std::string cmNinjaTargetGenerator::LanguageCompilerRule(
 // TODO: Picked up from cmMakefileTargetGenerator.  Refactor it.
 const char* cmNinjaTargetGenerator::GetFeature(const std::string& feature)
 {
-  return this->Target->GetFeature(feature, this->GetConfigName());
+  return this->GeneratorTarget->GetFeature(feature, this->GetConfigName());
 }
 
 // TODO: Picked up from cmMakefileTargetGenerator.  Refactor it.
 bool cmNinjaTargetGenerator::GetFeatureAsBool(const std::string& feature)
 {
-  return this->Target->GetFeatureAsBool(feature, this->GetConfigName());
+  return this->GeneratorTarget->GetFeatureAsBool(feature,
+                                                 this->GetConfigName());
 }
 
 // TODO: Picked up from cmMakefileTargetGenerator.  Refactor it.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 4436966..fd732d7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2814,34 +2814,6 @@ void cmTarget::GetTargetVersion(bool soversion,
 }
 
 //----------------------------------------------------------------------------
-const char* cmTarget::GetFeature(const std::string& feature,
-                                 const std::string& config) const
-{
-  if(!config.empty())
-    {
-    std::string featureConfig = feature;
-    featureConfig += "_";
-    featureConfig += cmSystemTools::UpperCase(config);
-    if(const char* value = this->GetProperty(featureConfig))
-      {
-      return value;
-      }
-    }
-  if(const char* value = this->GetProperty(feature))
-    {
-    return value;
-    }
-  return this->Makefile->GetFeature(feature, config);
-}
-
-//----------------------------------------------------------------------------
-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 0cbb575..f20966a 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -260,11 +260,6 @@ public:
   bool GetPropertyAsBool(const std::string& prop) const;
   void CheckProperty(const std::string& prop, cmMakefile* context) const;
 
-  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;}
 
   void GetObjectLibrariesCMP0026(std::vector<cmTarget*>& objlibs) const;

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

Summary of changes:
 Source/CMakeVersion.cmake                 |    2 +-
 Source/cmGeneratorTarget.cxx              |   30 ++++++++++++++++++++++++++++-
 Source/cmGeneratorTarget.h                |    5 +++++
 Source/cmGlobalVisualStudio7Generator.cxx |    3 ++-
 Source/cmLocalGenerator.cxx               |   27 ++++++++++++++++++++++++++
 Source/cmLocalGenerator.h                 |    3 +++
 Source/cmMakefile.cxx                     |   27 --------------------------
 Source/cmMakefile.h                       |    3 ---
 Source/cmMakefileTargetGenerator.cxx      |    4 ++--
 Source/cmNinjaTargetGenerator.cxx         |    5 +++--
 Source/cmTarget.cxx                       |   28 ---------------------------
 Source/cmTarget.h                         |    5 -----
 12 files changed, 72 insertions(+), 70 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list