[Cmake-commits] CMake branch, next, updated. v2.8.12-4819-g3c7262d

Stephen Kelly steveire at gmail.com
Sun Nov 3 17:06:56 EST 2013


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  3c7262d7f4cfbfabd7665f87ab8480d13389c5cc (commit)
       via  af4c1096f6878053042f3e64610c9f7fda6399cb (commit)
       via  6bdea066e673f0720e6faae42a4e144803679996 (commit)
       via  defbc2aa2aa8cf0735b1ec6da34ae9eecaabc9f9 (commit)
      from  82b717a83bdfdf274091111dee36bc6a493287ed (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=3c7262d7f4cfbfabd7665f87ab8480d13389c5cc
commit 3c7262d7f4cfbfabd7665f87ab8480d13389c5cc
Merge: 82b717a af4c109
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Nov 3 17:06:54 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Nov 3 17:06:54 2013 -0500

    Merge topic 'constify' into next
    
    af4c109 cmGeneratorTarget: Make some accessors const.
    6bdea06 cmTarget: Make some accessors const.
    defbc2a CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af4c1096f6878053042f3e64610c9f7fda6399cb
commit af4c1096f6878053042f3e64610c9f7fda6399cb
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Nov 3 14:10:12 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Nov 3 22:27:28 2013 +0100

    cmGeneratorTarget: Make some accessors const.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index b512675..b964f71 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -42,16 +42,16 @@ const char *cmGeneratorTarget::GetName() const
 }
 
 //----------------------------------------------------------------------------
-const char *cmGeneratorTarget::GetProperty(const char *prop)
+const char *cmGeneratorTarget::GetProperty(const char *prop) const
 {
   return this->Target->GetProperty(prop);
 }
 
 //----------------------------------------------------------------------------
 std::vector<cmSourceFile*> const*
-cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf)
+cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf) const
 {
-  SourceEntriesType::iterator i = this->SourceEntries.find(sf);
+  SourceEntriesType::const_iterator i = this->SourceEntries.find(sf);
   if(i != this->SourceEntries.end())
     {
     return &i->second.Depends;
@@ -61,7 +61,7 @@ cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf)
 
 //----------------------------------------------------------------------------
 bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
-                                                 const char *config)
+                                                 const char *config) const
 {
   std::string config_upper;
   if(config && *config)
@@ -70,7 +70,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
     }
 
   typedef std::map<std::string, std::vector<std::string> > IncludeCacheType;
-  IncludeCacheType::iterator iter =
+  IncludeCacheType::const_iterator iter =
       this->SystemIncludesCache.find(config_upper);
 
   if (iter == this->SystemIncludesCache.end())
@@ -111,13 +111,13 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
 }
 
 //----------------------------------------------------------------------------
-bool cmGeneratorTarget::GetPropertyAsBool(const char *prop)
+bool cmGeneratorTarget::GetPropertyAsBool(const char *prop) const
 {
   return this->Target->GetPropertyAsBool(prop);
 }
 
 //----------------------------------------------------------------------------
-std::vector<cmSourceFile*> const& cmGeneratorTarget::GetSourceFiles()
+std::vector<cmSourceFile*> const& cmGeneratorTarget::GetSourceFiles() const
 {
   return this->Target->GetSourceFiles();
 }
@@ -270,7 +270,8 @@ void cmGeneratorTarget::LookupObjectLibraries()
 }
 
 //----------------------------------------------------------------------------
-void cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs)
+void
+cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs) const
 {
   for(std::vector<cmTarget*>::const_iterator
         ti = this->ObjectLibraries.begin();
@@ -571,7 +572,7 @@ void cmGeneratorTarget::TraceDependencies()
 
 //----------------------------------------------------------------------------
 void cmGeneratorTarget::GetAppleArchs(const char* config,
-                             std::vector<std::string>& archVec)
+                             std::vector<std::string>& archVec) const
 {
   const char* archs = 0;
   if(config && *config)
@@ -591,7 +592,7 @@ void cmGeneratorTarget::GetAppleArchs(const char* config,
 }
 
 //----------------------------------------------------------------------------
-const char* cmGeneratorTarget::GetCreateRuleVariable()
+const char* cmGeneratorTarget::GetCreateRuleVariable() const
 {
   switch(this->GetType())
     {
@@ -617,7 +618,7 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories(
 }
 
 //----------------------------------------------------------------------------
-void cmGeneratorTarget::GenerateTargetManifest(const char* config)
+void cmGeneratorTarget::GenerateTargetManifest(const char* config) const
 {
   if (this->Target->IsImported())
     {
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index a99f54b..177bc25 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -28,9 +28,9 @@ public:
 
   int GetType() const;
   const char *GetName() const;
-  const char *GetProperty(const char *prop);
-  bool GetPropertyAsBool(const char *prop);
-  std::vector<cmSourceFile*> const& GetSourceFiles();
+  const char *GetProperty(const char *prop) const;
+  bool GetPropertyAsBool(const char *prop) const;
+  std::vector<cmSourceFile*> const& GetSourceFiles() const;
 
   cmTarget* Target;
   cmMakefile* Makefile;
@@ -60,22 +60,22 @@ public:
 
   std::vector<cmTarget*> ObjectLibraries;
 
-  void UseObjectLibraries(std::vector<std::string>& objs);
+  void UseObjectLibraries(std::vector<std::string>& objs) const;
 
   void GetAppleArchs(const char* config,
-                     std::vector<std::string>& archVec);
+                     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 char* GetCreateRuleVariable() const;
 
   /** Get the include directories for this target.  */
   std::vector<std::string> GetIncludeDirectories(const char *config);
 
-  bool IsSystemIncludeDirectory(const char *dir, const char *config);
+  bool IsSystemIncludeDirectory(const char *dir, const char *config) const;
 
   /** Add the target output files to the global generator manifest.  */
-  void GenerateTargetManifest(const char* config);
+  void GenerateTargetManifest(const char* config) const;
 
   /**
    * Trace through the source files in this target and add al source files
@@ -87,14 +87,14 @@ public:
   void LookupObjectLibraries();
 
   /** Get sources that must be built before the given source.  */
-  std::vector<cmSourceFile*> const* GetSourceDepends(cmSourceFile* sf);
+  std::vector<cmSourceFile*> const* GetSourceDepends(cmSourceFile* sf) const;
 
   struct SourceEntry { std::vector<cmSourceFile*> Depends; };
   typedef std::map<cmSourceFile*, SourceEntry> SourceEntriesType;
   SourceEntriesType SourceEntries;
 
 private:
-  std::map<std::string, std::vector<std::string> > SystemIncludesCache;
+  mutable std::map<std::string, std::vector<std::string> > SystemIncludesCache;
 
   cmGeneratorTarget(cmGeneratorTarget const&);
   void operator=(cmGeneratorTarget const&);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6bdea066e673f0720e6faae42a4e144803679996
commit 6bdea066e673f0720e6faae42a4e144803679996
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Nov 3 22:26:26 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Nov 3 22:27:28 2013 +0100

    cmTarget: Make some accessors const.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 70ab947..f8b6c92 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -507,7 +507,7 @@ bool cmTarget::FindSourceFiles()
 }
 
 //----------------------------------------------------------------------------
-std::vector<cmSourceFile*> const& cmTarget::GetSourceFiles()
+std::vector<cmSourceFile*> const& cmTarget::GetSourceFiles() const
 {
   return this->SourceFiles;
 }
@@ -3086,7 +3086,7 @@ std::string cmTarget::GetSOName(const char* config) const
 }
 
 //----------------------------------------------------------------------------
-bool cmTarget::HasMacOSXRpath(const char* config)
+bool cmTarget::HasMacOSXRpath(const char* config) const
 {
   bool install_name_is_rpath = false;
   bool macosx_rpath = this->GetPropertyAsBool("MACOSX_RPATH");
@@ -3233,7 +3233,7 @@ cmTarget::GetFullNameImported(const char* config, bool implib) const
 //----------------------------------------------------------------------------
 void cmTarget::GetFullNameComponents(std::string& prefix, std::string& base,
                                      std::string& suffix, const char* config,
-                                     bool implib)
+                                     bool implib) const
 {
   this->GetFullNameInternal(config, implib, prefix, base, suffix);
 }
@@ -3669,7 +3669,7 @@ bool cmTarget::HaveInstallTreeRPATH() const
 }
 
 //----------------------------------------------------------------------------
-bool cmTarget::NeedRelinkBeforeInstall(const char* config)
+bool cmTarget::NeedRelinkBeforeInstall(const char* config) const
 {
   // Only executables and shared libraries can have an rpath and may
   // need relinking.
@@ -3732,7 +3732,7 @@ bool cmTarget::NeedRelinkBeforeInstall(const char* config)
 }
 
 //----------------------------------------------------------------------------
-std::string cmTarget::GetInstallNameDirForBuildTree(const char* config)
+std::string cmTarget::GetInstallNameDirForBuildTree(const char* config) const
 {
   // If building directly for installation then the build tree install_name
   // is the same as the install tree.
@@ -3765,7 +3765,7 @@ std::string cmTarget::GetInstallNameDirForBuildTree(const char* config)
 }
 
 //----------------------------------------------------------------------------
-std::string cmTarget::GetInstallNameDirForInstallTree()
+std::string cmTarget::GetInstallNameDirForInstallTree() const
 {
   if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
     {
@@ -5802,7 +5802,7 @@ std::string cmTarget::BuildMacContentDirectory(const std::string& base,
 
 //----------------------------------------------------------------------------
 std::string cmTarget::GetMacContentDirectory(const char* config,
-                                             bool implib)
+                                             bool implib) const
 {
   // Start with the output directory for the target.
   std::string fpath = this->GetDirectory(config, implib);
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index eae5009..fbb4914 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -124,7 +124,7 @@ public:
   /**
    * Get the list of the source files used by this target
    */
-  std::vector<cmSourceFile*> const& GetSourceFiles();
+  std::vector<cmSourceFile*> const& GetSourceFiles() const;
   void AddSourceFile(cmSourceFile* sf);
   std::vector<std::string> const& GetObjectLibraries() const
     {
@@ -361,7 +361,7 @@ public:
   std::string GetFullName(const char* config=0, bool implib = false) const;
   void GetFullNameComponents(std::string& prefix,
                              std::string& base, std::string& suffix,
-                             const char* config=0, bool implib = false);
+                             const char* config=0, bool implib = false) const;
 
   /** Get the name of the pdb file for the target.  */
   std::string GetPDBName(const char* config=0) const;
@@ -373,7 +373,7 @@ public:
   std::string GetSOName(const char* config) const;
 
   /** Whether this library has \@rpath and platform supports it.  */
-  bool HasMacOSXRpath(const char* config);
+  bool HasMacOSXRpath(const char* config) const;
 
   /** Test for special case of a third-party shared library that has
       no soname at all.  */
@@ -409,7 +409,7 @@ public:
   /**
    * Compute whether this target must be relinked before installing.
    */
-  bool NeedRelinkBeforeInstall(const char* config);
+  bool NeedRelinkBeforeInstall(const char* config) const;
 
   bool HaveBuildTreeRPATH(const char *config) const;
   bool HaveInstallTreeRPATH() const;
@@ -420,11 +420,11 @@ public:
   /** Return the install name directory for the target in the
     * build tree.  For example: "\@rpath/", "\@loader_path/",
     * or "/full/path/to/library".  */
-  std::string GetInstallNameDirForBuildTree(const char* config);
+  std::string GetInstallNameDirForBuildTree(const char* config) const;
 
   /** Return the install name directory for the target in the
     * install tree.  For example: "\@rpath/" or "\@loader_path/". */
-  std::string GetInstallNameDirForInstallTree();
+  std::string GetInstallNameDirForInstallTree() const;
 
   cmComputeLinkInformation* GetLinkInformation(const char* config,
                                                cmTarget const* head = 0) const;
@@ -497,7 +497,7 @@ public:
 
   /** @return the mac content directory for this target. */
   std::string GetMacContentDirectory(const char* config,
-                                     bool implib);
+                                     bool implib) const;
 
   /** @return whether this target have a well defined output file name. */
   bool HaveWellDefinedOutputFiles() const;

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

Summary of changes:
 Source/CMakeVersion.cmake    |    2 +-
 Source/cmGeneratorTarget.cxx |   23 ++++++++++++-----------
 Source/cmGeneratorTarget.h   |   20 ++++++++++----------
 Source/cmTarget.cxx          |   14 +++++++-------
 Source/cmTarget.h            |   14 +++++++-------
 5 files changed, 37 insertions(+), 36 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list