[Cmake-commits] CMake branch, next, updated. v3.3.0-rc1-199-g5355cb1

Stephen Kelly steveire at gmail.com
Sun Jun 7 04:25:24 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  5355cb142ed77f2f4ada6a0d5abc21f09be150da (commit)
       via  b661d6c631884e48b27353b0ee9f4f0eb6f5eea7 (commit)
       via  40844a1487ea576987ecec148f77bbeebea9433d (commit)
       via  b1ff32afc67799d08130d457347290a41e426ed0 (commit)
       via  dd0417c7becb9d00bf60827d299b3d520bb138c5 (commit)
       via  125c48660ce5f58e8fa9371cfb9c192f42b19401 (commit)
       via  92b8b1fc3d885091cfef210216b682a389eaf2fb (commit)
       via  7f3e16239fd120eded5e23ee8a836d9e73119244 (commit)
       via  d9df7fa70c854207bb36b45ca0fdca6665bd4bd8 (commit)
       via  db24e41b9d939fb8ad9106f7a8511670505a8ad0 (commit)
       via  4cd13e80f00d4441112f400ff774d91a7fecfff8 (commit)
       via  3e087a408b4a5bad1eb079c61c982ce2dab0973a (commit)
       via  e04217010345fd350d3ddd7897e47eb47eaec1d8 (commit)
       via  c26696eb404888cec525bf3ee2e538ae8532156f (commit)
       via  41fef23b9b8bfa795e2d61e27b12f055ef9bbc39 (commit)
       via  647488570bfe7ce210bfd0675df0eb5147e36ab6 (commit)
       via  6f148e4a48f3f879998e67d9bb30de07f5cf5608 (commit)
       via  5181fae264444ad7736614ceb1e78c51def2b97c (commit)
       via  3ac4b90bfdcca97f1f63056c97afee38cf66ea12 (commit)
       via  7c0aa672fe4f1b5c4a15a89d90cd80009a1399d0 (commit)
       via  9058e27a431b01319b18cc4099780fa017ada113 (commit)
       via  1c48edf8fc8cec71c780cbb1c587f10df0ab7185 (commit)
       via  93cc2eef38eab76831916bfee9d6fe16fbaaf4c1 (commit)
       via  44a8115797cc3f804d653928d71b126b39e29210 (commit)
      from  8d3c59f6a1e48f3b5788860933fd6ba9e53f846b (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=5355cb142ed77f2f4ada6a0d5abc21f09be150da
commit 5355cb142ed77f2f4ada6a0d5abc21f09be150da
Merge: 8d3c59f b661d6c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 7 04:25:22 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jun 7 04:25:22 2015 -0400

    Merge topic 'data-layout' into next
    
    b661d6c6 cmQtAutoGenerators: Re-arrange data layout.
    40844a14 cmProcessTools: Re-arrange data layout.
    b1ff32af cmOrderDirectories: Re-arrange data layout.
    dd0417c7 cmInstallTargetGenerator: Re-arrange data layout.
    125c4866 cmInstallFilesGenerator: Re-arrange data layout.
    92b8b1fc cmGraphVizWriter: Re-arrange data layout.
    7f3e1623 cmGlobalGenerator: Re-arrange data layout.
    d9df7fa7 cmComputeComponentGraph: Re-arrange data layout.
    db24e41b cmCommandArgumentParserHelper: Re-arrange data.
    4cd13e80 cmComputeLinkInformation: Re-arrange data layout.
    3e087a40 cmLocalUnixMakefileGenerator: Re-arrange data layout.
    e0421701 cmMakefile: Re-arrange data layout.
    c26696eb cmSourceFile: Re-arrange data.
    41fef23b cmTarget: Re-arrange data layout.
    64748857 cmTarget: Replace PolicyStatus members with PolicyMap.
    6f148e4a cmTarget: Use method abstraction for policy status.
    ...


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b661d6c631884e48b27353b0ee9f4f0eb6f5eea7
commit b661d6c631884e48b27353b0ee9f4f0eb6f5eea7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 7 10:11:42 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 10:24:28 2015 +0200

    cmQtAutoGenerators: Re-arrange data layout.
    
    Size goes from 920 to 912 bytes.

diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index f74e3c5..4c0fcbc 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -105,7 +105,6 @@ private:
   std::string SkipMoc;
   std::string SkipUic;
   std::string Headers;
-  bool IncludeProjectDirsBefore;
   std::string Srcdir;
   std::string Builddir;
   std::string MocExecutable;
@@ -131,6 +130,7 @@ private:
   std::map<std::string, std::string> RccOptions;
   std::map<std::string, std::vector<std::string> > RccInputs;
 
+  bool IncludeProjectDirsBefore;
   bool Verbose;
   bool ColorOutput;
   bool RunMocFailed;
@@ -138,7 +138,6 @@ private:
   bool RunRccFailed;
   bool GenerateAll;
   bool RelaxedMode;
-
 };
 
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=40844a1487ea576987ecec148f77bbeebea9433d
commit 40844a1487ea576987ecec148f77bbeebea9433d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 7 10:09:47 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 10:24:28 2015 +0200

    cmProcessTools: Re-arrange data layout.
    
    Size goes from 72 to 64 bytes.

diff --git a/Source/cmProcessTools.cxx b/Source/cmProcessTools.cxx
index d2f7bf3..15d9ed0 100644
--- a/Source/cmProcessTools.cxx
+++ b/Source/cmProcessTools.cxx
@@ -44,7 +44,7 @@ void cmProcessTools::RunProcess(struct cmsysProcess_s* cp,
 
 //----------------------------------------------------------------------------
 cmProcessTools::LineParser::LineParser(char sep, bool ignoreCR):
-  Separator(sep), IgnoreCR(ignoreCR), Log(0), Prefix(0), LineEnd('\0')
+   Log(0), Prefix(0), Separator(sep), LineEnd('\0'), IgnoreCR(ignoreCR)
 {
 }
 
diff --git a/Source/cmProcessTools.h b/Source/cmProcessTools.h
index 439726d..23833ca 100644
--- a/Source/cmProcessTools.h
+++ b/Source/cmProcessTools.h
@@ -51,12 +51,12 @@ public:
     /** Configure logging of lines as they are extracted.  */
     void SetLog(std::ostream* log, const char* prefix);
   protected:
-    char Separator;
-    bool IgnoreCR;
     std::ostream* Log;
     const char* Prefix;
-    char LineEnd;
     std::string Line;
+    char Separator;
+    char LineEnd;
+    bool IgnoreCR;
     virtual bool ProcessChunk(const char* data, int length);
 
     /** Implement in a subclass to process one line of input.  It

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1ff32afc67799d08130d457347290a41e426ed0
commit b1ff32afc67799d08130d457347290a41e426ed0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 7 10:06:19 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 10:24:27 2015 +0200

    cmOrderDirectories: Re-arrange data layout.
    
    Size goes from 680 to 672 bytes.

diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h
index 07c85dd..cb5a51f 100644
--- a/Source/cmOrderDirectories.h
+++ b/Source/cmOrderDirectories.h
@@ -44,8 +44,6 @@ private:
   cmTarget const* Target;
   std::string Purpose;
 
-  bool Computed;
-
   std::vector<std::string> OrderedDirectories;
 
   std::vector<cmOrderDirectoriesConstraint*> ConstraintEntries;
@@ -68,8 +66,9 @@ private:
   void OrderDirectories();
   void VisitDirectory(unsigned int i);
   void DiagnoseCycle();
-  bool CycleDiagnosed;
   int WalkId;
+  bool CycleDiagnosed;
+  bool Computed;
 
   // Adjacency-list representation of runtime path ordering graph.
   // This maps from directory to those that must come *before* it.

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dd0417c7becb9d00bf60827d299b3d520bb138c5
commit dd0417c7becb9d00bf60827d299b3d520bb138c5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 7 10:01:00 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 10:24:27 2015 +0200

    cmInstallTargetGenerator: Re-arrange data layout.
    
    Remove unused cmGeneratorTarget member.
    
    Size goes from 238 to 232 bytes.

diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 082a78c..5115788 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -29,7 +29,9 @@ cmInstallTargetGenerator
                            MessageLevel message,
                            bool optional):
   cmInstallGenerator(dest, configurations, component, message), Target(&t),
-  ImportLibrary(implib), FilePermissions(file_permissions), Optional(optional)
+  FilePermissions(file_permissions),
+  ImportLibrary(implib),
+  Optional(optional)
 {
   this->ActionsPerConfig = true;
   this->NamelinkMode = NamelinkModeNone;
diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h
index 075c8a4..db69220 100644
--- a/Source/cmInstallTargetGenerator.h
+++ b/Source/cmInstallTargetGenerator.h
@@ -14,7 +14,6 @@
 
 #include "cmInstallGenerator.h"
 #include "cmTarget.h"
-#include "cmGeneratorTarget.h"
 
 /** \class cmInstallTargetGenerator
  * \brief Generate target installation rules.
@@ -100,11 +99,10 @@ protected:
                      const std::string& toDestDirPath);
 
   cmTarget* Target;
-  bool ImportLibrary;
   std::string FilePermissions;
-  bool Optional;
   NamelinkModeType NamelinkMode;
-  cmGeneratorTarget* GeneratorTarget;
+  bool ImportLibrary;
+  bool Optional;
 };
 
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=125c48660ce5f58e8fa9371cfb9c192f42b19401
commit 125c48660ce5f58e8fa9371cfb9c192f42b19401
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 7 09:57:33 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 10:24:27 2015 +0200

    cmInstallFilesGenerator: Re-arrange data layout.
    
    Size goes from 296 to 288 bytes.

diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx
index 28c27c2..ff2c6e5 100644
--- a/Source/cmInstallFilesGenerator.cxx
+++ b/Source/cmInstallFilesGenerator.cxx
@@ -28,9 +28,11 @@ cmInstallFilesGenerator
                           bool optional):
   cmInstallGenerator(dest, configurations, component, message),
   Makefile(mf),
-  Files(files), Programs(programs),
+  Files(files),
   FilePermissions(file_permissions),
-  Rename(rename), Optional(optional)
+  Rename(rename),
+  Programs(programs),
+  Optional(optional)
 {
   // We need per-config actions if any files have generator expressions.
   for(std::vector<std::string>::const_iterator i = files.begin();
diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h
index 0dbd712..bf482d6 100644
--- a/Source/cmInstallFilesGenerator.h
+++ b/Source/cmInstallFilesGenerator.h
@@ -43,9 +43,9 @@ protected:
 
   cmMakefile* Makefile;
   std::vector<std::string> Files;
-  bool Programs;
   std::string FilePermissions;
   std::string Rename;
+  bool Programs;
   bool Optional;
 };
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92b8b1fc3d885091cfef210216b682a389eaf2fb
commit 92b8b1fc3d885091cfef210216b682a389eaf2fb
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 7 09:54:55 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 10:24:26 2015 +0200

    cmGraphVizWriter: Re-arrange data layout.
    
    Size goes from 272 to 264 bytes.

diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index 7f4c4c9..fa29b4f 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -48,6 +48,7 @@ cmGraphVizWriter::cmGraphVizWriter(const std::vector<cmLocalGenerator*>&
 ,GraphName("GG")
 ,GraphHeader("node [\n  fontsize = \"12\"\n];")
 ,GraphNodePrefix("node")
+,LocalGenerators(localGenerators)
 ,GenerateForExecutables(true)
 ,GenerateForStaticLibs(true)
 ,GenerateForSharedLibs(true)
@@ -55,7 +56,6 @@ cmGraphVizWriter::cmGraphVizWriter(const std::vector<cmLocalGenerator*>&
 ,GenerateForExternals(true)
 ,GeneratePerTarget(true)
 ,GenerateDependers(true)
-,LocalGenerators(localGenerators)
 ,HaveTargetsAndLibs(false)
 {
 }
diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h
index a7acd0e..64de684 100644
--- a/Source/cmGraphVizWriter.h
+++ b/Source/cmGraphVizWriter.h
@@ -69,14 +69,6 @@ protected:
   std::string GraphHeader;
   std::string GraphNodePrefix;
 
-  bool GenerateForExecutables;
-  bool GenerateForStaticLibs;
-  bool GenerateForSharedLibs;
-  bool GenerateForModuleLibs;
-  bool GenerateForExternals;
-  bool GeneratePerTarget;
-  bool GenerateDependers;
-
   std::vector<cmsys::RegularExpression> TargetsToIgnoreRegex;
 
   const std::vector<cmLocalGenerator*>& LocalGenerators;
@@ -85,6 +77,13 @@ protected:
   // maps from the actual target names to node names in dot:
   std::map<std::string, std::string> TargetNamesNodes;
 
+  bool GenerateForExecutables;
+  bool GenerateForStaticLibs;
+  bool GenerateForSharedLibs;
+  bool GenerateForModuleLibs;
+  bool GenerateForExternals;
+  bool GeneratePerTarget;
+  bool GenerateDependers;
   bool HaveTargetsAndLibs;
 };
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f3e16239fd120eded5e23ee8a836d9e73119244
commit 7f3e16239fd120eded5e23ee8a836d9e73119244
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 7 09:47:37 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 10:24:26 2015 +0200

    cmGlobalGenerator: Re-arrange data layout.
    
    Size goes from 1488 to 1480 bytes.

diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 3b368c6..f02df90 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -398,10 +398,6 @@ protected:
     std::vector<std::string> depends, const char* workingDir,
     bool uses_terminal);
 
-  bool NeedSymbolicMark;
-  bool UseLinkScript;
-  bool ForceUnixPaths;
-  bool ToolSupportsColor;
   std::string FindMakeProgramFile;
   std::string ConfiguredFilesPath;
   cmake *CMakeInstance;
@@ -414,7 +410,6 @@ protected:
 
   // Set of named installation components requested by the project.
   std::set<std::string> InstallComponents;
-  bool InstallTargetEnabled;
   // Sets of named target exports
   cmExportSetMap ExportSets;
   std::map<std::string, cmExportBuildFileGenerator*> BuildExportSets;
@@ -448,7 +443,6 @@ private:
                                                  cmState::Snapshot snapshot);
 
   cmMakefile* TryCompileOuterMakefile;
-  float FirstTimeProgress;
   // If you add a new map here, make sure it is copied
   // in EnableLanguagesFromGenerator
   std::map<std::string, bool> IgnoreExtensions;
@@ -521,6 +515,14 @@ private:
   // Pool of file locks
   cmFileLockPool FileLockPool;
 #endif
+
+protected:
+  float FirstTimeProgress;
+  bool NeedSymbolicMark;
+  bool UseLinkScript;
+  bool ForceUnixPaths;
+  bool ToolSupportsColor;
+  bool InstallTargetEnabled;
 };
 
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9df7fa70c854207bb36b45ca0fdca6665bd4bd8
commit d9df7fa70c854207bb36b45ca0fdca6665bd4bd8
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 7 09:43:11 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:43:39 2015 +0200

    cmComputeComponentGraph: Re-arrange data layout.
    
    Size goes from 224 to 216 bytes.

diff --git a/Source/cmComputeComponentGraph.h b/Source/cmComputeComponentGraph.h
index a2ce946..4dbac4a 100644
--- a/Source/cmComputeComponentGraph.h
+++ b/Source/cmComputeComponentGraph.h
@@ -67,17 +67,17 @@ private:
     int Root;
     int VisitIndex;
   };
-  int TarjanWalkId;
   std::vector<int> TarjanVisited;
   std::vector<int> TarjanComponents;
   std::vector<TarjanEntry> TarjanEntries;
+  std::vector<NodeList> Components;
   std::stack<int> TarjanStack;
+  int TarjanWalkId;
   int TarjanIndex;
   void Tarjan();
   void TarjanVisit(int i);
 
   // Connected components.
-  std::vector<NodeList> Components;
 };
 
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db24e41b9d939fb8ad9106f7a8511670505a8ad0
commit db24e41b9d939fb8ad9106f7a8511670505a8ad0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 7 09:40:57 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:41:19 2015 +0200

    cmCommandArgumentParserHelper: Re-arrange data.
    
    Size goes from 232 to 216 bytes.

diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h
index d375ae6..387afc6 100644
--- a/Source/cmCommandArgumentParserHelper.h
+++ b/Source/cmCommandArgumentParserHelper.h
@@ -80,8 +80,6 @@ private:
   std::string::size_type InputBufferPos;
   std::string InputBuffer;
   std::vector<char> OutputBuffer;
-  int CurrentLine;
-  int Verbose;
 
   void Print(const char* place, const char* str);
   void SafePrintMissing(const char* str, int line, int cnt);
@@ -94,12 +92,14 @@ private:
   std::vector<char*> Variables;
   const cmMakefile* Makefile;
   std::string Result;
+  std::string ErrorString;
   const char* FileName;
+  long FileLine;
+  int CurrentLine;
+  int Verbose;
   bool WarnUninitialized;
   bool CheckSystemVars;
-  long FileLine;
   bool EscapeQuotes;
-  std::string ErrorString;
   bool NoEscapeMode;
   bool ReplaceAtSyntax;
   bool RemoveEmpty;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4cd13e80f00d4441112f400ff774d91a7fecfff8
commit 4cd13e80f00d4441112f400ff774d91a7fecfff8
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:59:24 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:32:39 2015 +0200

    cmComputeLinkInformation: Re-arrange data layout.
    
    Size goes from 1944 to 1920 bytes.

diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index 8847141..ccf520b 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -82,7 +82,6 @@ private:
   // Configuration information.
   std::string Config;
   std::string LinkLanguage;
-  bool LinkDependsNoShared;
 
   // Modes for dealing with dependent shared libraries.
   enum SharedDepMode
@@ -93,8 +92,6 @@ private:
     SharedDepModeLink    // List file on link line
   };
 
-  // System info.
-  bool UseImportLibrary;
   const char* LoaderFlag;
   std::string LibLinkFlag;
   std::string LibLinkFileFlag;
@@ -102,22 +99,18 @@ private:
   std::string RuntimeFlag;
   std::string RuntimeSep;
   std::string RuntimeAlways;
-  bool RuntimeUseChrpath;
-  bool NoSONameUsesPath;
-  bool LinkWithRuntimePath;
   std::string RPathLinkFlag;
   SharedDepMode SharedDependencyMode;
 
+  enum LinkType { LinkUnknown, LinkStatic, LinkShared };
+  void SetCurrentLinkType(LinkType lt);
+
   // Link type adjustment.
   void ComputeLinkTypeInfo();
-  enum LinkType { LinkUnknown, LinkStatic, LinkShared };
   LinkType StartLinkType;
   LinkType CurrentLinkType;
   std::string StaticLinkTypeFlag;
   std::string SharedLinkTypeFlag;
-  bool LinkTypeEnabled;
-  void SetCurrentLinkType(LinkType lt);
-  bool ArchivesMayBeShared;
 
   // Link item parsing.
   void ComputeItemParserInfo();
@@ -129,7 +122,6 @@ private:
   cmsys::RegularExpression ExtractSharedLibraryName;
   cmsys::RegularExpression ExtractAnyLibraryName;
   std::string SharedRegexString;
-  bool OpenBSD;
   void AddLinkPrefix(const char* p);
   void AddLinkExtension(const char* e, LinkType type);
   std::string CreateExtensionRegex(std::vector<std::string> const& exts,
@@ -173,20 +165,27 @@ private:
   std::set<std::string> OldLinkDirMask;
   std::vector<std::string> OldLinkDirItems;
   std::vector<std::string> OldUserFlagItems;
-  bool OldLinkDirMode;
-
-  // CMP0060 warnings.
-  bool CMP0060Warn;
   std::set<std::string> CMP0060WarnItems;
-
+  // Dependent library path computation.
+  cmOrderDirectories* OrderDependentRPath;
   // Runtime path computation.
   cmOrderDirectories* OrderRuntimeSearchPath;
+
+  bool OldLinkDirMode;
+  bool OpenBSD;
+  bool LinkDependsNoShared;
+  bool UseImportLibrary;
+  bool RuntimeUseChrpath;
+  bool NoSONameUsesPath;
+  bool LinkWithRuntimePath;
+  bool LinkTypeEnabled;
+  bool ArchivesMayBeShared;
+  bool CMP0060Warn;
+
   void AddLibraryRuntimeInfo(std::string const& fullPath,
                              cmTarget const* target);
   void AddLibraryRuntimeInfo(std::string const& fullPath);
 
-  // Dependent library path computation.
-  cmOrderDirectories* OrderDependentRPath;
 };
 
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e087a408b4a5bad1eb079c61c982ce2dab0973a
commit 3e087a408b4a5bad1eb079c61c982ce2dab0973a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:46:10 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:32:38 2015 +0200

    cmLocalUnixMakefileGenerator: Re-arrange data layout.
    
    Size goes from 536 to 528 bytes.

diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index f2a1389..dcb3016 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -254,26 +254,10 @@ private:
 
   ImplicitDependTargetMap ImplicitDepends;
 
-  //==========================================================================
-  // Configuration settings.
-  int MakefileVariableSize;
   std::string ConfigurationName;
-  bool MakeCommandEscapeTargetTwice;
-  bool BorlandMakeCurlyHack;
-  //==========================================================================
 
   std::string HomeRelativeOutputPath;
 
-  /* Copy the setting of CMAKE_COLOR_MAKEFILE from the makefile at the
-     beginning of generation to avoid many duplicate lookups.  */
-  bool ColorMakefile;
-
-  /* Copy the setting of CMAKE_SKIP_PREPROCESSED_SOURCE_RULES and
-     CMAKE_SKIP_ASSEMBLY_SOURCE_RULES at the beginning of generation to
-     avoid many duplicate lookups.  */
-  bool SkipPreprocessedSourceRules;
-  bool SkipAssemblySourceRules;
-
   struct LocalObjectEntry
   {
     cmTarget* Target;
@@ -302,6 +286,13 @@ private:
   /* does the work for each target */
   std::map<std::string, std::string> MakeVariableMap;
   std::map<std::string, std::string> ShortMakeVariableMap;
+
+  int MakefileVariableSize;
+  bool MakeCommandEscapeTargetTwice;
+  bool BorlandMakeCurlyHack;
+  bool ColorMakefile;
+  bool SkipPreprocessedSourceRules;
+  bool SkipAssemblySourceRules;
 };
 
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e04217010345fd350d3ddd7897e47eb47eaec1d8
commit e04217010345fd350d3ddd7897e47eb47eaec1d8
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:45:56 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:32:38 2015 +0200

    cmMakefile: Re-arrange data layout.
    
    2168 to 2152 bytes with GNU libstdc++-5.1.

diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 7518631..32223b4 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -372,8 +372,6 @@ public:
   };
   friend class PolicyPushPop;
 
-  mutable std::set<cmListFileContext> CMP0054ReportedIds;
-
   /**
    * Determine if the given context, name pair has already been reported
    * in context of CMP0054.
@@ -848,6 +846,8 @@ protected:
   // Check for a an unused variable
   void LogUnused(const char* reason, const std::string& name) const;
 
+  mutable std::set<cmListFileContext> CMP0054ReportedIds;
+
   std::string ProjectName;    // project name
 
   // libraries, classes, and executables
@@ -949,10 +949,6 @@ private:
 
   cmPropertyMap Properties;
 
-  // Unused variable flags
-  bool WarnUnused;
-  bool CheckSystemVars;
-
   // stack of list files being read
   std::vector<std::string> ListFileStack;
 
@@ -994,8 +990,6 @@ private:
   cmPolicies::PolicyStatus
   GetPolicyStatusInternal(cmPolicies::PolicyID id) const;
 
-  bool CheckCMP0000;
-
   // Enforce rules about CMakeLists.txt files.
   void EnforceDirectoryLevelRules() const;
 
@@ -1021,7 +1015,6 @@ private:
                                   long line,
                                   bool removeEmpty,
                                   bool replaceAt) const;
-  bool Configured;
   /**
    * Old version of GetSourceFileWithOutput(const std::string&) kept for
    * backward-compatibility. It implements a linear search and support
@@ -1067,6 +1060,11 @@ private:
 
   void CheckForUnusedVariables() const;
 
+  // Unused variable flags
+  bool WarnUnused;
+  bool CheckSystemVars;
+  bool CheckCMP0000;
+  bool Configured;
   mutable bool SuppressWatches;
 };
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c26696eb404888cec525bf3ee2e538ae8532156f
commit c26696eb404888cec525bf3ee2e538ae8532156f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:45:50 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:32:24 2015 +0200

    cmSourceFile: Re-arrange data.
    
    Size goes from 304 to 296 bytes.

diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h
index f898260..1433b54 100644
--- a/Source/cmSourceFile.h
+++ b/Source/cmSourceFile.h
@@ -107,8 +107,9 @@ private:
   std::string Extension;
   std::string Language;
   std::string FullPath;
-  bool FindFullPathFailed;
   std::string ObjectLibrary;
+  std::vector<std::string> Depends;
+  bool FindFullPathFailed;
   bool IsUiFile;
 
   bool FindFullPath(std::string* error);
@@ -116,7 +117,6 @@ private:
   void CheckExtension();
   void CheckLanguage(std::string const& ext);
 
-  std::vector<std::string> Depends;
 
   static const std::string propLANGUAGE;
 };

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=41fef23b9b8bfa795e2d61e27b12f055ef9bbc39
commit 41fef23b9b8bfa795e2d61e27b12f055ef9bbc39
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:44:47 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:29:31 2015 +0200

    cmTarget: Re-arrange data layout.
    
    Size with GNU libstdc++-5.1 goes from 840 bytes to 808 bytes.

diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index cade7ab..ddc8d35 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -642,12 +642,6 @@ public:
 private:
   bool HandleLocationPropertyPolicy(cmMakefile* context) const;
 
-  // The set of include directories that are marked as system include
-  // directories.
-  std::set<std::string> SystemIncludeDirectories;
-
-  std::vector<std::pair<TLLSignature, cmListFileContext> > TLLCommands;
-
 #if defined(_WIN32) && !defined(__CYGWIN__)
   /**
    * A list of direct dependencies. Use in conjunction with DependencyMap.
@@ -742,40 +736,48 @@ private:
   void GetSourceFiles(std::vector<std::string> &files,
                       const std::string& config) const;
 private:
+  mutable cmPropertyMap Properties;
+  std::set<std::string> SystemIncludeDirectories;
+  std::set<std::string> LinkDirectoriesEmmitted;
+  std::set<std::string> Utilities;
+  mutable std::set<std::string> LinkImplicitNullProperties;
+  std::map<std::string, cmListFileBacktrace> UtilityBacktraces;
+  mutable std::map<std::string, bool> DebugCompatiblePropertiesDone;
+  mutable std::map<std::string, std::string> MaxLanguageStandards;
+  cmPolicies::PolicyMap PolicyMap;
   std::string Name;
+  std::string InstallPath;
+  std::string RuntimeInstallPath;
+  mutable std::string ExportMacro;
+  std::vector<std::string> LinkDirectories;
   std::vector<cmCustomCommand> PreBuildCommands;
   std::vector<cmCustomCommand> PreLinkCommands;
   std::vector<cmCustomCommand> PostBuildCommands;
-  TargetType TargetTypeValue;
+  std::vector<std::pair<TLLSignature, cmListFileContext> > TLLCommands;
   LinkLibraryVectorType PrevLinkedLibraries;
+  LinkLibraryVectorType OriginalLinkLibraries;
 #if defined(_WIN32) && !defined(__CYGWIN__)
   LinkLibraryVectorType LinkLibrariesForVS6;
-  bool LinkLibrariesForVS6Analyzed;
 #endif
-  std::vector<std::string> LinkDirectories;
-  std::set<std::string> LinkDirectoriesEmmitted;
+  cmMakefile* Makefile;
+  cmTargetInternalPointer Internal;
+  TargetType TargetTypeValue;
   bool HaveInstallRule;
-  std::string InstallPath;
-  std::string RuntimeInstallPath;
-  mutable std::string ExportMacro;
-  std::set<std::string> Utilities;
-  std::map<std::string, cmListFileBacktrace> UtilityBacktraces;
   bool RecordDependencies;
-  mutable cmPropertyMap Properties;
-  LinkLibraryVectorType OriginalLinkLibraries;
   bool DLLPlatform;
   bool IsAndroid;
   bool IsApple;
   bool IsImportedTarget;
+  bool BuildInterfaceIncludesAppended;
   mutable bool DebugIncludesDone;
-  mutable std::map<std::string, bool> DebugCompatiblePropertiesDone;
   mutable bool DebugCompileOptionsDone;
   mutable bool DebugCompileDefinitionsDone;
   mutable bool DebugSourcesDone;
   mutable bool DebugCompileFeaturesDone;
-  mutable std::set<std::string> LinkImplicitNullProperties;
-  mutable std::map<std::string, std::string> MaxLanguageStandards;
-  bool BuildInterfaceIncludesAppended;
+  mutable bool LinkImplementationLanguageIsContextDependent;
+#if defined(_WIN32) && !defined(__CYGWIN__)
+  bool LinkLibrariesForVS6Analyzed;
+#endif
 
   // Cache target output paths for each configuration.
   struct OutputInfo;
@@ -825,16 +827,10 @@ private:
 
   void ProcessSourceExpression(std::string const& expr);
 
-  // The cmMakefile instance that owns this target.  This should
-  // always be set.
-  cmMakefile* Makefile;
-  cmPolicies::PolicyMap PolicyMap;
-
   // Internal representation details.
   friend class cmTargetInternals;
   friend class cmGeneratorTarget;
   friend class cmTargetTraceDependencies;
-  cmTargetInternalPointer Internal;
 
   void ComputeVersionedName(std::string& vName,
                             std::string const& prefix,
@@ -842,8 +838,6 @@ private:
                             std::string const& suffix,
                             std::string const& name,
                             const char* version) const;
-
-  mutable bool LinkImplementationLanguageIsContextDependent;
 };
 
 #ifdef CMAKE_BUILD_WITH_CMAKE

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=647488570bfe7ce210bfd0675df0eb5147e36ab6
commit 647488570bfe7ce210bfd0675df0eb5147e36ab6
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat May 2 14:50:02 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:29:31 2015 +0200

    cmTarget: Replace PolicyStatus members with PolicyMap.
    
    sizeof(cmTarget) goes from 856 to 840 with GNU libstdc++ 5.1.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 5e866ef..daf5282 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -239,13 +239,6 @@ cmTargetInternals::~cmTargetInternals()
 //----------------------------------------------------------------------------
 cmTarget::cmTarget()
 {
-#define INITIALIZE_TARGET_POLICY_MEMBER(POLICY) \
-  this->PolicyStatus ## POLICY = cmPolicies::WARN;
-
-  CM_FOR_EACH_TARGET_POLICY(INITIALIZE_TARGET_POLICY_MEMBER)
-
-#undef INITIALIZE_TARGET_POLICY_MEMBER
-
   this->Makefile = 0;
 #if defined(_WIN32) && !defined(__CYGWIN__)
   this->LinkLibrariesForVS6Analyzed = false;
@@ -440,20 +433,14 @@ void cmTarget::SetMakefile(cmMakefile* mf)
     }
 
   // Record current policies for later use.
-#define CAPTURE_TARGET_POLICY(POLICY) \
-  this->PolicyStatus ## POLICY = \
-    this->Makefile->GetPolicyStatus(cmPolicies::POLICY);
-
-  CM_FOR_EACH_TARGET_POLICY(CAPTURE_TARGET_POLICY)
-
-#undef CAPTURE_TARGET_POLICY
+  this->Makefile->RecordPolicies(this->PolicyMap);
 
   if (this->TargetTypeValue == INTERFACE_LIBRARY)
     {
     // This policy is checked in a few conditions. The properties relevant
     // to the policy are always ignored for INTERFACE_LIBRARY targets,
     // so ensure that the conditions don't lead to nonsense.
-    this->PolicyStatusCMP0022 = cmPolicies::NEW;
+    this->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW);
     }
 
   if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 0cbb575..cade7ab 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -144,7 +144,7 @@ public:
 
 #define DECLARE_TARGET_POLICY(POLICY) \
   cmPolicies::PolicyStatus GetPolicyStatus ## POLICY () const \
-    { return this->PolicyStatus ## POLICY; }
+    { return this->PolicyMap.Get(cmPolicies::POLICY); }
 
   CM_FOR_EACH_TARGET_POLICY(DECLARE_TARGET_POLICY)
 
@@ -828,14 +828,7 @@ private:
   // The cmMakefile instance that owns this target.  This should
   // always be set.
   cmMakefile* Makefile;
-
-  // Policy status recorded when target was created.
-#define TARGET_POLICY_MEMBER(POLICY) \
-  cmPolicies::PolicyStatus PolicyStatus ## POLICY;
-
-  CM_FOR_EACH_TARGET_POLICY(TARGET_POLICY_MEMBER)
-
-#undef TARGET_POLICY_MEMBER
+  cmPolicies::PolicyMap PolicyMap;
 
   // Internal representation details.
   friend class cmTargetInternals;

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

    cmTarget: Use method abstraction for policy status.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index d1399ef..5e866ef 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -5925,8 +5925,8 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
   // libraries and executables that export symbols.
   const char* explicitLibraries = 0;
   std::string linkIfaceProp;
-  if(thisTarget->PolicyStatusCMP0022 != cmPolicies::OLD &&
-     thisTarget->PolicyStatusCMP0022 != cmPolicies::WARN)
+  if(thisTarget->GetPolicyStatusCMP0022() != cmPolicies::OLD &&
+     thisTarget->GetPolicyStatusCMP0022() != cmPolicies::WARN)
     {
     // CMP0022 NEW behavior is to use INTERFACE_LINK_LIBRARIES.
     linkIfaceProp = "INTERFACE_LINK_LIBRARIES";
@@ -5952,7 +5952,7 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
     }
 
   if(explicitLibraries &&
-     thisTarget->PolicyStatusCMP0022 == cmPolicies::WARN &&
+     thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN &&
      !this->PolicyWarnedCMP0022)
     {
     // Compare the explicitly set old link interface properties to the
@@ -5996,8 +5996,8 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
                                 iface.Libraries,
                                 iface.HadHeadSensitiveCondition);
     }
-  else if (thisTarget->PolicyStatusCMP0022 == cmPolicies::WARN
-        || thisTarget->PolicyStatusCMP0022 == cmPolicies::OLD)
+  else if (thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN
+        || thisTarget->GetPolicyStatusCMP0022() == cmPolicies::OLD)
     // If CMP0022 is NEW then the plain tll signature sets the
     // INTERFACE_LINK_LIBRARIES, so if we get here then the project
     // cleared the property explicitly and we should not fall back
@@ -6008,7 +6008,7 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
       thisTarget->GetLinkImplementationLibrariesInternal(config, headTarget);
     iface.Libraries.insert(iface.Libraries.end(),
                            impl->Libraries.begin(), impl->Libraries.end());
-    if(thisTarget->PolicyStatusCMP0022 == cmPolicies::WARN &&
+    if(thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN &&
        !this->PolicyWarnedCMP0022 && !usage_requirements_only)
       {
       // Compare the link implementation fallback link interface to the
@@ -6100,8 +6100,8 @@ void cmTargetInternals::ComputeLinkInterface(cmTarget const* thisTarget,
         }
       }
     }
-  else if (thisTarget->PolicyStatusCMP0022 == cmPolicies::WARN
-        || thisTarget->PolicyStatusCMP0022 == cmPolicies::OLD)
+  else if (thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN
+        || thisTarget->GetPolicyStatusCMP0022() == cmPolicies::OLD)
     {
     // The link implementation is the default link interface.
     cmTarget::LinkImplementationLibraries const*
@@ -6421,7 +6421,7 @@ std::string cmTarget::CheckCMP0004(std::string const& item) const
   if(lib != item)
     {
     cmake* cm = this->Makefile->GetCMakeInstance();
-    switch(this->PolicyStatusCMP0004)
+    switch(this->GetPolicyStatusCMP0004())
       {
       case cmPolicies::WARN:
         {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5181fae264444ad7736614ceb1e78c51def2b97c
commit 5181fae264444ad7736614ceb1e78c51def2b97c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:41:30 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:29:31 2015 +0200

    cmPropertyMap: Remove chaining logic.
    
    The chaining logic doesn't belong to the container, and the
    CMakeInstance pointer doesn't need to be in cmPropertyMap.
    
    Size goes from 56 to 48 bytes with GNU libstdc++-5.1.

diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index bd8c10c..0d24ed5 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -526,11 +526,9 @@ void * CCONV cmCreateSourceFile(void)
   return (void*)new cmCPluginAPISourceFile;
 }
 
-void * CCONV cmCreateNewSourceFile(void *arg)
+void * CCONV cmCreateNewSourceFile(void *)
 {
-  cmMakefile *mf = static_cast<cmMakefile *>(arg);
   cmCPluginAPISourceFile *sf = new cmCPluginAPISourceFile;
-  sf->Properties.SetCMakeInstance(mf->GetCMakeInstance());
   return (void*)sf;
 }
 
@@ -630,11 +628,7 @@ const char * CCONV  cmSourceFileGetProperty(void *arg,const char *prop)
       {
       return sf->FullPath.c_str();
       }
-    bool chain = false;
-    // Ignore chain because old code will not expect it and it is a
-    // pain to implement here anyway.
-    return sf->Properties.GetPropertyValue(prop, cmProperty::SOURCE_FILE,
-                                           chain);
+    return sf->Properties.GetPropertyValue(prop);
     }
 }
 
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 6af14f2..54209c5 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -161,7 +161,6 @@ bool cmCacheManager::LoadCache(const std::string& path,
     // Format is key:type=value
     std::string helpString;
     CacheEntry e;
-    e.Properties.SetCMakeInstance(this->CMakeInstance);
     cmSystemTools::GetLineFromStream(fin, buffer);
     realbuffer = buffer.c_str();
     while(*realbuffer != '0' &&
@@ -323,7 +322,6 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey,
         {
         // Create an entry and store the property.
         CacheEntry& ne = this->Cache[key];
-        ne.Properties.SetCMakeInstance(this->CMakeInstance);
         ne.Type = cmState::UNINITIALIZED;
         ne.SetProperty(*p, e.Value.c_str());
         }
@@ -645,7 +643,6 @@ void cmCacheManager::AddCacheEntry(const std::string& key,
                                    cmState::CacheEntryType type)
 {
   CacheEntry& e = this->Cache[key];
-  e.Properties.SetCMakeInstance(this->CMakeInstance);
   if ( value )
     {
     e.Value = value;
@@ -744,9 +741,7 @@ cmCacheManager::CacheEntry::GetProperty(const std::string& prop) const
     {
     return this->Value.c_str();
     }
-  bool c = false;
-  return
-    this->Properties.GetPropertyValue(prop, cmProperty::CACHE, c);
+  return this->Properties.GetPropertyValue(prop);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 481de19..bd949bb 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2438,7 +2438,6 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
 {
   // Package
   cmTarget target;
-  target.GetProperties().SetCMakeInstance(this->CMakeInstance);
   target.SetType(cmTarget::GLOBAL_TARGET, name);
   target.SetProperty("EXCLUDE_FROM_ALL","TRUE");
 
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 9c0d4b1..bc308f1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -213,8 +213,6 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
   this->AddSourceGroup("Object Files", "\\.(lo|o|obj)$");
 #endif
 
-  this->Properties.SetCMakeInstance(this->GetCMakeInstance());
-
   {
   const char* dir = this->GetCMakeInstance()->GetHomeDirectory();
   this->AddDefinition("CMAKE_SOURCE_DIR", dir);
@@ -4134,11 +4132,13 @@ void cmMakefile::AppendProperty(const std::string& prop,
 
 const char *cmMakefile::GetProperty(const std::string& prop) const
 {
-  return this->GetProperty(prop, cmProperty::DIRECTORY);
+  const bool chain = this->GetState()->
+                  IsPropertyChained(prop, cmProperty::DIRECTORY);
+  return this->GetProperty(prop, chain);
 }
 
 const char *cmMakefile::GetProperty(const std::string& prop,
-                                    cmProperty::ScopeType scope) const
+                                    bool chain) const
 {
   // watch for specific properties
   static std::string output;
@@ -4242,15 +4242,13 @@ const char *cmMakefile::GetProperty(const std::string& prop,
     return output.c_str();
     }
 
-  bool chain = false;
-  const char *retVal =
-    this->Properties.GetPropertyValue(prop, scope, chain);
-  if (chain)
+  const char *retVal = this->Properties.GetPropertyValue(prop);
+  if (!retVal && chain)
     {
     if(this->LocalGenerator->GetParent())
       {
       return this->LocalGenerator->GetParent()->GetMakefile()->
-        GetProperty(prop, scope);
+        GetProperty(prop, chain);
       }
     return this->GetState()->GetGlobalProperty(prop);
     }
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index def0c23..7518631 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -717,8 +717,7 @@ 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,
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx
index de2cd05..ef09dbc 100644
--- a/Source/cmPropertyMap.cxx
+++ b/Source/cmPropertyMap.cxx
@@ -57,22 +57,13 @@ void cmPropertyMap::AppendProperty(const std::string& name, const char* value,
 }
 
 const char *cmPropertyMap
-::GetPropertyValue(const std::string& name,
-                   cmProperty::ScopeType scope,
-                   bool &chain) const
+::GetPropertyValue(const std::string& name) const
 {
-  chain = false;
   assert(!name.empty());
 
   cmPropertyMap::const_iterator it = this->find(name);
   if (it == this->end())
     {
-    // should we chain up?
-    if (this->CMakeInstance)
-      {
-      chain = this->CMakeInstance->GetState()->
-                    IsPropertyChained(name,scope);
-      }
     return 0;
     }
   return it->second.GetValue();
diff --git a/Source/cmPropertyMap.h b/Source/cmPropertyMap.h
index 722732b..a9062db 100644
--- a/Source/cmPropertyMap.h
+++ b/Source/cmPropertyMap.h
@@ -14,8 +14,6 @@
 
 #include "cmProperty.h"
 
-class cmake;
-
 class cmPropertyMap : public std::map<std::string,cmProperty>
 {
 public:
@@ -26,16 +24,7 @@ public:
   void AppendProperty(const std::string& name, const char* value,
                       bool asString=false);
 
-  const char *GetPropertyValue(const std::string& name,
-                               cmProperty::ScopeType scope,
-                               bool &chain) const;
-
-  void SetCMakeInstance(cmake *cm) { this->CMakeInstance = cm; }
-
-  cmPropertyMap() { this->CMakeInstance = 0;}
-
-private:
-  cmake *CMakeInstance;
+  const char *GetPropertyValue(const std::string& name) const;
 };
 
 #endif
diff --git a/Source/cmSetTestsPropertiesCommand.cxx b/Source/cmSetTestsPropertiesCommand.cxx
index e9cfacc..53dc5a8 100644
--- a/Source/cmSetTestsPropertiesCommand.cxx
+++ b/Source/cmSetTestsPropertiesCommand.cxx
@@ -85,8 +85,10 @@ bool cmSetTestsPropertiesCommand
     unsigned int k;
     for (k = 0; k < propertyPairs.size(); k = k + 2)
       {
-      test->SetProperty(propertyPairs[k],
-                        propertyPairs[k+1].c_str());
+      if (!propertyPairs[k].empty())
+        {
+        test->SetProperty(propertyPairs[k], propertyPairs[k+1].c_str());
+        }
       }
     }
   else
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index df511d8..86f0a7a 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -22,7 +22,6 @@ cmSourceFile::cmSourceFile(cmMakefile* mf, const std::string& name):
   Location(mf, name)
 {
   this->CustomCommand = 0;
-  this->Properties.SetCMakeInstance(mf->GetCMakeInstance());
   this->FindFullPathFailed = false;
   this->IsUiFile = (".ui" ==
           cmSystemTools::GetFilenameLastExtension(this->Location.GetName()));
@@ -361,13 +360,16 @@ const char* cmSourceFile::GetProperty(const std::string& prop) const
       }
     }
 
-  bool chain = false;
-  const char *retVal =
-    this->Properties.GetPropertyValue(prop, cmProperty::SOURCE_FILE, chain);
-  if (chain)
+  const char *retVal = this->Properties.GetPropertyValue(prop);
+  if (!retVal)
     {
     cmMakefile const* mf = this->Location.GetMakefile();
-    return mf->GetProperty(prop,cmProperty::SOURCE_FILE);
+    const bool chain = mf->GetState()->
+                      IsPropertyChained(prop, cmProperty::SOURCE_FILE);
+    if (chain)
+      {
+      return mf->GetProperty(prop, chain);
+      }
     }
 
   return retVal;
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 7bfeda1..25b4966 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -482,9 +482,7 @@ const char *cmState::GetGlobalProperty(const std::string& prop)
     return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1;
     }
 #undef STRING_LIST_ELEMENT
-  bool dummy = false;
-  return this->GlobalProperties.GetPropertyValue(prop, cmProperty::GLOBAL,
-                                                 dummy);
+  return this->GlobalProperties.GetPropertyValue(prop);
 }
 
 bool cmState::GetGlobalPropertyAsBool(const std::string& prop)
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 8731632..d1399ef 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -286,9 +286,6 @@ void cmTarget::SetMakefile(cmMakefile* mf)
   // Set our makefile.
   this->Makefile = mf;
 
-  // set the cmake instance of the properties
-  this->Properties.SetCMakeInstance(mf->GetCMakeInstance());
-
   // Check whether this is a DLL platform.
   this->DLLPlatform = (this->Makefile->IsOn("WIN32") ||
                        this->Makefile->IsOn("CYGWIN") ||
@@ -3167,12 +3164,15 @@ const char *cmTarget::GetProperty(const std::string& prop,
       }
     }
 
-  bool chain = false;
-  const char *retVal =
-    this->Properties.GetPropertyValue(prop, cmProperty::TARGET, chain);
-  if (chain)
+  const char *retVal = this->Properties.GetPropertyValue(prop);
+  if (!retVal)
     {
-    return this->Makefile->GetProperty(prop, cmProperty::TARGET);
+    const bool chain = this->GetMakefile()->GetState()->
+                      IsPropertyChained(prop, cmProperty::TARGET);
+    if (chain)
+      {
+      return this->Makefile->GetProperty(prop, chain);
+      }
     }
   return retVal;
 }
diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx
index c606859..6fcd0dc 100644
--- a/Source/cmTest.cxx
+++ b/Source/cmTest.cxx
@@ -21,7 +21,6 @@ cmTest::cmTest(cmMakefile* mf)
 {
   this->Makefile = mf;
   this->OldStyle = true;
-  this->Properties.SetCMakeInstance(mf->GetCMakeInstance());
 }
 
 //----------------------------------------------------------------------------
@@ -50,12 +49,15 @@ void cmTest::SetCommand(std::vector<std::string> const& command)
 //----------------------------------------------------------------------------
 const char *cmTest::GetProperty(const std::string& prop) const
 {
-  bool chain = false;
-  const char *retVal =
-    this->Properties.GetPropertyValue(prop, cmProperty::TEST, chain);
-  if (chain)
+  const char *retVal = this->Properties.GetPropertyValue(prop);
+  if (!retVal)
     {
-    return this->Makefile->GetProperty(prop,cmProperty::TEST);
+    const bool chain = this->Makefile->GetState()->
+          IsPropertyChained(prop, cmProperty::TEST);
+    if (chain)
+      {
+      return this->Makefile->GetProperty(prop, chain);
+      }
     }
   return retVal;
 }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ac4b90bfdcca97f1f63056c97afee38cf66ea12
commit 3ac4b90bfdcca97f1f63056c97afee38cf66ea12
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:41:20 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:29:30 2015 +0200

    cmPropertyMap: Require a non-empty name parameter.
    
    The cmGetPropertyCommand already checks for this.

diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx
index 76803c1..6717035 100644
--- a/Source/cmGetCMakePropertyCommand.cxx
+++ b/Source/cmGetCMakePropertyCommand.cxx
@@ -52,9 +52,11 @@ bool cmGetCMakePropertyCommand
     }
   else
     {
-    const char *prop =
-      this->Makefile->GetState()
-          ->GetGlobalProperty(args[1]);
+    const char *prop = 0;
+    if (!args[1].empty())
+      {
+      prop = this->Makefile->GetState()->GetGlobalProperty(args[1]);
+      }
     if (prop)
       {
       output = prop;
diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx
index 4fe3318..228e53c 100644
--- a/Source/cmGetDirectoryPropertyCommand.cxx
+++ b/Source/cmGetDirectoryPropertyCommand.cxx
@@ -84,7 +84,11 @@ bool cmGetDirectoryPropertyCommand
     return true;
     }
 
-  const char *prop = dir->GetProperty(*i);
+  const char *prop = 0;
+  if (!i->empty())
+    {
+    prop = dir->GetProperty(*i);
+    }
   if (prop)
     {
     this->Makefile->AddDefinition(variable, prop);
diff --git a/Source/cmGetSourceFilePropertyCommand.cxx b/Source/cmGetSourceFilePropertyCommand.cxx
index 7667a85..46daa34 100644
--- a/Source/cmGetSourceFilePropertyCommand.cxx
+++ b/Source/cmGetSourceFilePropertyCommand.cxx
@@ -38,7 +38,11 @@ bool cmGetSourceFilePropertyCommand
       this->Makefile->AddDefinition(var, sf->GetLanguage().c_str());
       return true;
       }
-    const char *prop = sf->GetPropertyForUser(args[2]);
+    const char *prop = 0;
+    if (!args[2].empty())
+      {
+      prop = sf->GetPropertyForUser(args[2]);
+      }
     if (prop)
       {
       this->Makefile->AddDefinition(var, prop);
diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx
index 315e851..ca40bd0 100644
--- a/Source/cmGetTargetPropertyCommand.cxx
+++ b/Source/cmGetTargetPropertyCommand.cxx
@@ -40,7 +40,11 @@ bool cmGetTargetPropertyCommand
   else if(cmTarget* tgt = this->Makefile->FindTargetToUse(targetName))
     {
     cmTarget& target = *tgt;
-    const char* prop_cstr = target.GetProperty(args[2], this->Makefile);
+    const char* prop_cstr = 0;
+    if (!args[2].empty())
+      {
+      prop_cstr = target.GetProperty(args[2], this->Makefile);
+      }
     if(prop_cstr)
       {
       prop = prop_cstr;
diff --git a/Source/cmGetTestPropertyCommand.cxx b/Source/cmGetTestPropertyCommand.cxx
index b3df4c3..bf34589 100644
--- a/Source/cmGetTestPropertyCommand.cxx
+++ b/Source/cmGetTestPropertyCommand.cxx
@@ -29,7 +29,11 @@ bool cmGetTestPropertyCommand
   cmTest *test = this->Makefile->GetTest(testName);
   if (test)
     {
-    const char *prop = test->GetProperty(args[1]);
+    const char *prop = 0;
+    if (!args[1].empty())
+      {
+      prop = test->GetProperty(args[1]);
+      }
     if (prop)
       {
       this->Makefile->AddDefinition(var, prop);
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx
index d1402c8..de2cd05 100644
--- a/Source/cmPropertyMap.cxx
+++ b/Source/cmPropertyMap.cxx
@@ -14,6 +14,8 @@
 #include "cmake.h"
 #include "cmState.h"
 
+#include <assert.h>
+
 cmProperty *cmPropertyMap::GetOrCreateProperty(const std::string& name)
 {
   cmPropertyMap::iterator it = this->find(name);
@@ -60,10 +62,7 @@ const char *cmPropertyMap
                    bool &chain) const
 {
   chain = false;
-  if (name.empty())
-    {
-    return 0;
-    }
+  assert(!name.empty());
 
   cmPropertyMap::const_iterator it = this->find(name);
   if (it == this->end())

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c0aa672fe4f1b5c4a15a89d90cd80009a1399d0
commit 7c0aa672fe4f1b5c4a15a89d90cd80009a1399d0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:41:15 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:29:30 2015 +0200

    cmPropertyMap: Remove scope parameter from API where not used.

diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index c55ea35..bd8c10c 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -662,7 +662,7 @@ void CCONV cmSourceFileSetProperty(void *arg,const char *prop,
   else if(prop)
     {
     if(!value) { value = "NOTFOUND"; }
-    sf->Properties.SetProperty(prop, value, cmProperty::SOURCE_FILE);
+    sf->Properties.SetProperty(prop, value);
     }
 }
 
@@ -801,8 +801,7 @@ void CCONV cmSourceFileSetName2(void *arg, const char* name, const char* dir,
   // Implement the old SetName method code here.
   if(headerFileOnly)
     {
-    sf->Properties.SetProperty("HEADER_FILE_ONLY", "1",
-                               cmProperty::SOURCE_FILE);
+    sf->Properties.SetProperty("HEADER_FILE_ONLY", "1");
     }
   sf->SourceName = name;
   std::string fname = sf->SourceName;
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 108208e..6af14f2 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -763,7 +763,7 @@ void cmCacheManager::CacheEntry::SetProperty(const std::string& prop,
     }
   else
     {
-    this->Properties.SetProperty(prop, value, cmProperty::CACHE);
+    this->Properties.SetProperty(prop, value);
     }
 }
 
@@ -789,7 +789,7 @@ void cmCacheManager::CacheEntry::AppendProperty(const std::string& prop,
     }
   else
     {
-    this->Properties.AppendProperty(prop, value, cmProperty::CACHE, asString);
+    this->Properties.AppendProperty(prop, value, asString);
     }
 }
 
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 3ac77e9..9c0d4b1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4089,7 +4089,7 @@ void cmMakefile::SetProperty(const std::string& prop, const char* value)
       }
     }
 
-  this->Properties.SetProperty(prop,value,cmProperty::DIRECTORY);
+  this->Properties.SetProperty(prop, value);
 }
 
 void cmMakefile::AppendProperty(const std::string& prop,
@@ -4129,7 +4129,7 @@ void cmMakefile::AppendProperty(const std::string& prop,
     return;
     }
 
-  this->Properties.AppendProperty(prop,value,cmProperty::DIRECTORY,asString);
+  this->Properties.AppendProperty(prop, value, asString);
 }
 
 const char *cmMakefile::GetProperty(const std::string& prop) const
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx
index 03124dc..d1402c8 100644
--- a/Source/cmPropertyMap.cxx
+++ b/Source/cmPropertyMap.cxx
@@ -29,29 +29,26 @@ cmProperty *cmPropertyMap::GetOrCreateProperty(const std::string& name)
   return prop;
 }
 
-void cmPropertyMap::SetProperty(const std::string& name, const char *value,
-                                cmProperty::ScopeType scope)
+void cmPropertyMap::SetProperty(const std::string& name, const char *value)
 {
   if(!value)
     {
     this->erase(name);
     return;
     }
-  (void)scope;
 
   cmProperty *prop = this->GetOrCreateProperty(name);
   prop->Set(value);
 }
 
 void cmPropertyMap::AppendProperty(const std::string& name, const char* value,
-                                   cmProperty::ScopeType scope, bool asString)
+                                   bool asString)
 {
   // Skip if nothing to append.
   if(!value || !*value)
     {
     return;
     }
-  (void)scope;
 
   cmProperty *prop = this->GetOrCreateProperty(name);
   prop->Append(value,asString);
diff --git a/Source/cmPropertyMap.h b/Source/cmPropertyMap.h
index 02d4235..722732b 100644
--- a/Source/cmPropertyMap.h
+++ b/Source/cmPropertyMap.h
@@ -21,11 +21,10 @@ class cmPropertyMap : public std::map<std::string,cmProperty>
 public:
   cmProperty *GetOrCreateProperty(const std::string& name);
 
-  void SetProperty(const std::string& name, const char *value,
-                   cmProperty::ScopeType scope);
+  void SetProperty(const std::string& name, const char *value);
 
   void AppendProperty(const std::string& name, const char* value,
-                      cmProperty::ScopeType scope, bool asString=false);
+                      bool asString=false);
 
   const char *GetPropertyValue(const std::string& name,
                                cmProperty::ScopeType scope,
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 724ab39..df511d8 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -299,7 +299,7 @@ bool cmSourceFile::Matches(cmSourceFileLocation const& loc)
 //----------------------------------------------------------------------------
 void cmSourceFile::SetProperty(const std::string& prop, const char* value)
 {
-  this->Properties.SetProperty(prop, value, cmProperty::SOURCE_FILE);
+  this->Properties.SetProperty(prop, value);
 
   if (this->IsUiFile)
     {
@@ -315,8 +315,7 @@ void cmSourceFile::SetProperty(const std::string& prop, const char* value)
 void cmSourceFile::AppendProperty(const std::string& prop, const char* value,
                                   bool asString)
 {
-  this->Properties.AppendProperty(prop, value, cmProperty::SOURCE_FILE,
-                                  asString);
+  this->Properties.AppendProperty(prop, value, asString);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 15a4638..7bfeda1 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -438,14 +438,13 @@ void cmState::RemoveUserDefinedCommands()
 
 void cmState::SetGlobalProperty(const std::string& prop, const char* value)
 {
-  this->GlobalProperties.SetProperty(prop, value, cmProperty::GLOBAL);
+  this->GlobalProperties.SetProperty(prop, value);
 }
 
 void cmState::AppendGlobalProperty(const std::string& prop,
                                    const char* value, bool asString)
 {
-  this->GlobalProperties.AppendProperty(prop, value,
-                                        cmProperty::GLOBAL, asString);
+  this->GlobalProperties.AppendProperty(prop, value, asString);
 }
 
 const char *cmState::GetGlobalProperty(const std::string& prop)
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 4436966..8731632 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1772,7 +1772,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
     }
   else
     {
-    this->Properties.SetProperty(prop, value, cmProperty::TARGET);
+    this->Properties.SetProperty(prop, value);
     this->MaybeInvalidatePropertyCache(prop);
     }
 }
@@ -1857,7 +1857,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
     }
   else
     {
-    this->Properties.AppendProperty(prop, value, cmProperty::TARGET, asString);
+    this->Properties.AppendProperty(prop, value, asString);
     this->MaybeInvalidatePropertyCache(prop);
     }
 }
@@ -2938,8 +2938,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
       // cannot take into account the per-configuration name of the
       // target because the configuration type may not be known at
       // CMake time.
-      this->Properties.SetProperty(propLOCATION, this->GetLocationForBuild(),
-                                   cmProperty::TARGET);
+      this->Properties.SetProperty(propLOCATION, this->GetLocationForBuild());
       }
 
     // Support "LOCATION_<CONFIG>".
@@ -2950,9 +2949,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
         return 0;
         }
       const char* configName = prop.c_str() + 9;
-      this->Properties.SetProperty(prop,
-                                   this->GetLocation(configName),
-                                   cmProperty::TARGET);
+      this->Properties.SetProperty(prop, this->GetLocation(configName));
       }
     // Support "<CONFIG>_LOCATION".
     else if(cmHasLiteralSuffix(prop, "_LOCATION"))
@@ -2964,9 +2961,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
           {
           return 0;
           }
-        this->Properties.SetProperty(prop,
-                                     this->GetLocation(configName),
-                                     cmProperty::TARGET);
+        this->Properties.SetProperty(prop, this->GetLocation(configName));
         }
       }
     }
@@ -3168,8 +3163,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
             }
           }
         }
-      this->Properties.SetProperty("SOURCES", ss.str().c_str(),
-                                   cmProperty::TARGET);
+      this->Properties.SetProperty("SOURCES", ss.str().c_str());
       }
     }
 
diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx
index ff5d411..c606859 100644
--- a/Source/cmTest.cxx
+++ b/Source/cmTest.cxx
@@ -69,12 +69,12 @@ bool cmTest::GetPropertyAsBool(const std::string& prop) const
 //----------------------------------------------------------------------------
 void cmTest::SetProperty(const std::string& prop, const char* value)
 {
-  this->Properties.SetProperty(prop, value, cmProperty::TEST);
+  this->Properties.SetProperty(prop, value);
 }
 
 //----------------------------------------------------------------------------
 void cmTest::AppendProperty(const std::string& prop,
                             const char* value, bool asString)
 {
-  this->Properties.AppendProperty(prop, value, cmProperty::TEST, asString);
+  this->Properties.AppendProperty(prop, value, asString);
 }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9058e27a431b01319b18cc4099780fa017ada113
commit 9058e27a431b01319b18cc4099780fa017ada113
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:46:38 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:29:30 2015 +0200

    Constify property definition API.

diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 250bd35..36b6c64 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -142,8 +142,7 @@ bool cmGetPropertyCommand
     {
     // Lookup brief documentation.
     std::string output;
-    if(cmPropertyDefinition* def =
-       this->Makefile->GetState()->
+    if(cmPropertyDefinition const* def = this->Makefile->GetState()->
        GetPropertyDefinition(this->PropertyName, scope))
       {
       output = def->GetShortDescription();
@@ -158,8 +157,7 @@ bool cmGetPropertyCommand
     {
     // Lookup full documentation.
     std::string output;
-    if(cmPropertyDefinition* def =
-       this->Makefile->GetState()->
+    if(cmPropertyDefinition const* def = this->Makefile->GetState()->
        GetPropertyDefinition(this->PropertyName, scope))
       {
       output = def->GetFullDescription();
diff --git a/Source/cmPropertyDefinitionMap.cxx b/Source/cmPropertyDefinitionMap.cxx
index 3875318..776fad1 100644
--- a/Source/cmPropertyDefinitionMap.cxx
+++ b/Source/cmPropertyDefinitionMap.cxx
@@ -29,9 +29,9 @@ void cmPropertyDefinitionMap
     }
 }
 
-bool cmPropertyDefinitionMap::IsPropertyDefined(const std::string& name)
+bool cmPropertyDefinitionMap::IsPropertyDefined(const std::string& name) const
 {
-  cmPropertyDefinitionMap::iterator it = this->find(name);
+  cmPropertyDefinitionMap::const_iterator it = this->find(name);
   if (it == this->end())
     {
     return false;
@@ -40,9 +40,9 @@ bool cmPropertyDefinitionMap::IsPropertyDefined(const std::string& name)
   return true;
 }
 
-bool cmPropertyDefinitionMap::IsPropertyChained(const std::string& name)
+bool cmPropertyDefinitionMap::IsPropertyChained(const std::string& name) const
 {
-  cmPropertyDefinitionMap::iterator it = this->find(name);
+  cmPropertyDefinitionMap::const_iterator it = this->find(name);
   if (it == this->end())
     {
     return false;
diff --git a/Source/cmPropertyDefinitionMap.h b/Source/cmPropertyDefinitionMap.h
index 00c7328..f95c721 100644
--- a/Source/cmPropertyDefinitionMap.h
+++ b/Source/cmPropertyDefinitionMap.h
@@ -27,10 +27,10 @@ public:
                       bool chain);
 
   // has a named property been defined
-  bool IsPropertyDefined(const std::string& name);
+  bool IsPropertyDefined(const std::string& name) const;
 
   // is a named property set to chain
-  bool IsPropertyChained(const std::string& name);
+  bool IsPropertyChained(const std::string& name) const;
 };
 
 #endif
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index c6fb299..15a4638 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -256,27 +256,41 @@ void cmState::DefineProperty(const std::string& name,
                                                   chained);
 }
 
-cmPropertyDefinition *cmState
+cmPropertyDefinition const* cmState
 ::GetPropertyDefinition(const std::string& name,
-                        cmProperty::ScopeType scope)
+                        cmProperty::ScopeType scope) const
 {
   if (this->IsPropertyDefined(name,scope))
     {
-    return &(this->PropertyDefinitions[scope][name]);
+    cmPropertyDefinitionMap const& defs =
+        this->PropertyDefinitions.find(scope)->second;
+    return &defs.find(name)->second;
     }
   return 0;
 }
 
 bool cmState::IsPropertyDefined(const std::string& name,
-                              cmProperty::ScopeType scope)
+                                cmProperty::ScopeType scope) const
 {
-  return this->PropertyDefinitions[scope].IsPropertyDefined(name);
+  std::map<cmProperty::ScopeType, cmPropertyDefinitionMap>::const_iterator it
+      = this->PropertyDefinitions.find(scope);
+  if (it == this->PropertyDefinitions.end())
+    {
+    return false;
+    }
+  return it->second.IsPropertyDefined(name);
 }
 
 bool cmState::IsPropertyChained(const std::string& name,
-                              cmProperty::ScopeType scope)
+                                cmProperty::ScopeType scope) const
 {
-  return this->PropertyDefinitions[scope].IsPropertyChained(name);
+  std::map<cmProperty::ScopeType, cmPropertyDefinitionMap>::const_iterator it
+      = this->PropertyDefinitions.find(scope);
+  if (it == this->PropertyDefinitions.end())
+    {
+    return false;
+    }
+  return it->second.IsPropertyChained(name);
 }
 
 void cmState::SetLanguageEnabled(std::string const& l)
diff --git a/Source/cmState.h b/Source/cmState.h
index 60b024f..b06f77c 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -102,12 +102,14 @@ public:
                       bool chain = false);
 
   // get property definition
-  cmPropertyDefinition *GetPropertyDefinition
-  (const std::string& name, cmProperty::ScopeType scope);
+  cmPropertyDefinition const* GetPropertyDefinition
+  (const std::string& name, cmProperty::ScopeType scope) const;
 
   // Is a property defined?
-  bool IsPropertyDefined(const std::string& name, cmProperty::ScopeType scope);
-  bool IsPropertyChained(const std::string& name, cmProperty::ScopeType scope);
+  bool IsPropertyDefined(const std::string& name,
+                         cmProperty::ScopeType scope) const;
+  bool IsPropertyChained(const std::string& name,
+                         cmProperty::ScopeType scope) const;
 
   void SetLanguageEnabled(std::string const& l);
   bool GetLanguageEnabled(std::string const& l) const;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c48edf8fc8cec71c780cbb1c587f10df0ab7185
commit 1c48edf8fc8cec71c780cbb1c587f10df0ab7185
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:46:26 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:29:29 2015 +0200

    cmProperty: Remove needless Name member.
    
    Size goes from 72 to 40 bytes with GNU libstdc++-5.1.

diff --git a/Source/cmProperty.cxx b/Source/cmProperty.cxx
index 40976db..ef57068 100644
--- a/Source/cmProperty.cxx
+++ b/Source/cmProperty.cxx
@@ -12,17 +12,14 @@
 #include "cmProperty.h"
 #include "cmSystemTools.h"
 
-void cmProperty::Set(const std::string& name, const char *value)
+void cmProperty::Set(const char *value)
 {
-  this->Name = name;
   this->Value = value;
   this->ValueHasBeenSet = true;
 }
 
-void cmProperty::Append(const std::string& name, const char *value,
-                        bool asString)
+void cmProperty::Append(const char *value, bool asString)
 {
-  this->Name = name;
   if(!this->Value.empty() && *value && !asString)
     {
     this->Value += ";";
diff --git a/Source/cmProperty.h b/Source/cmProperty.h
index 659c4c3..e026372 100644
--- a/Source/cmProperty.h
+++ b/Source/cmProperty.h
@@ -21,11 +21,10 @@ public:
                    TEST, VARIABLE, CACHED_VARIABLE, INSTALL };
 
   // set this property
-  void Set(const std::string& name, const char *value);
+  void Set(const char *value);
 
   // append to this property
-  void Append(const std::string& name, const char *value,
-              bool asString = false);
+  void Append(const char *value, bool asString = false);
 
   // get the value
   const char *GetValue() const;
@@ -34,7 +33,6 @@ public:
   cmProperty() { this->ValueHasBeenSet = false; }
 
 protected:
-  std::string Name;
   std::string Value;
   bool ValueHasBeenSet;
 };
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx
index 070f6f1..03124dc 100644
--- a/Source/cmPropertyMap.cxx
+++ b/Source/cmPropertyMap.cxx
@@ -40,7 +40,7 @@ void cmPropertyMap::SetProperty(const std::string& name, const char *value,
   (void)scope;
 
   cmProperty *prop = this->GetOrCreateProperty(name);
-  prop->Set(name,value);
+  prop->Set(value);
 }
 
 void cmPropertyMap::AppendProperty(const std::string& name, const char* value,
@@ -54,7 +54,7 @@ void cmPropertyMap::AppendProperty(const std::string& name, const char* value,
   (void)scope;
 
   cmProperty *prop = this->GetOrCreateProperty(name);
-  prop->Append(name,value,asString);
+  prop->Append(value,asString);
 }
 
 const char *cmPropertyMap

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93cc2eef38eab76831916bfee9d6fe16fbaaf4c1
commit 93cc2eef38eab76831916bfee9d6fe16fbaaf4c1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jun 6 09:41:05 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 7 09:29:29 2015 +0200

    cmPolicies: Store all statuses in a single bitset.
    
    Currently there are an optimal number of policies (64) such that
    there are no wasted bits.  When another policy is added, the
    cmPolicyMap will grow from 40 bytes to 80, and occupy 45.  By storing
    all in a single bitset, we stay under the cache line size of 64 bytes
    until there are 512 policies in a range.

diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 3498adc..5026893 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -348,19 +348,19 @@ cmPolicies::PolicyMap::Get(cmPolicies::PolicyID id) const
 {
   PolicyStatus status = cmPolicies::WARN;
 
-  if (this->OLD[id])
+  if (this->Status[(POLICY_STATUS_COUNT * id) + OLD])
     {
     status = cmPolicies::OLD;
     }
-  else if (this->NEW[id])
+  else if (this->Status[(POLICY_STATUS_COUNT * id) + NEW])
     {
     status = cmPolicies::NEW;
     }
-  else if (this->REQUIRED_ALWAYS[id])
+  else if (this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_ALWAYS])
     {
     status = cmPolicies::REQUIRED_ALWAYS;
     }
-  else if (this->REQUIRED_IF_USED[id])
+  else if (this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_IF_USED])
     {
     status = cmPolicies::REQUIRED_IF_USED;
     }
@@ -370,21 +370,25 @@ cmPolicies::PolicyMap::Get(cmPolicies::PolicyID id) const
 void cmPolicies::PolicyMap::Set(cmPolicies::PolicyID id,
                                 cmPolicies::PolicyStatus status)
 {
-  this->OLD[id] = (status == cmPolicies::OLD);
-  this->WARN[id] = (status == cmPolicies::WARN);
-  this->NEW[id] = (status == cmPolicies::NEW);
-  this->REQUIRED_ALWAYS[id] = (status == cmPolicies::REQUIRED_ALWAYS);
-  this->REQUIRED_IF_USED[id] = (status == cmPolicies::REQUIRED_IF_USED);
+  this->Status[(POLICY_STATUS_COUNT * id) + OLD] = (status == OLD);
+  this->Status[(POLICY_STATUS_COUNT * id) + WARN] = (status == WARN);
+  this->Status[(POLICY_STATUS_COUNT * id) + NEW] = (status == NEW);
+  this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_ALWAYS] =
+      (status == REQUIRED_ALWAYS);
+  this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_IF_USED] =
+      (status == REQUIRED_IF_USED);
 }
 
 bool cmPolicies::PolicyMap::IsDefined(cmPolicies::PolicyID id) const
 {
-  return this->OLD[id] || this->WARN[id] || this->NEW[id]
-      || this->REQUIRED_ALWAYS[id] || this->REQUIRED_IF_USED[id];
+  return this->Status[(POLICY_STATUS_COUNT * id) + OLD]
+      || this->Status[(POLICY_STATUS_COUNT * id) + WARN]
+      || this->Status[(POLICY_STATUS_COUNT * id) + NEW]
+      || this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_ALWAYS]
+      || this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_IF_USED];
 }
 
 bool cmPolicies::PolicyMap::IsEmpty() const
 {
-  return this->OLD.none() && this->WARN.none() && this->NEW.none()
-      && this->REQUIRED_ALWAYS.none() && this->REQUIRED_IF_USED.none();
+  return this->Status.none();
 }
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 8c72dfe..8a3c27d 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -244,6 +244,7 @@ public:
     REQUIRED_IF_USED,
     REQUIRED_ALWAYS ///< Issue an error unless user sets policy status to NEW.
   };
+#define POLICY_STATUS_COUNT 5
 
   /// Policy identifiers
   enum PolicyID
@@ -287,11 +288,7 @@ public:
     bool IsEmpty() const;
 
   private:
-    std::bitset<cmPolicies::CMPCOUNT> OLD;
-    std::bitset<cmPolicies::CMPCOUNT> WARN;
-    std::bitset<cmPolicies::CMPCOUNT> NEW;
-    std::bitset<cmPolicies::CMPCOUNT> REQUIRED_IF_USED;
-    std::bitset<cmPolicies::CMPCOUNT> REQUIRED_ALWAYS;
+    std::bitset<cmPolicies::CMPCOUNT * POLICY_STATUS_COUNT> Status;
   };
 };
 

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

    cmPolicies: Replace UNDEFINED bitset with WARN bitset.
    
    Might as well use the existing concept.

diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index f8d61db..3498adc 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -343,11 +343,6 @@ cmPolicies::GetRequiredAlwaysPolicyError(cmPolicies::PolicyID id)
   return e.str();
 }
 
-cmPolicies::PolicyMap::PolicyMap()
-{
-  this->UNDEFINED.set();
-}
-
 cmPolicies::PolicyStatus
 cmPolicies::PolicyMap::Get(cmPolicies::PolicyID id) const
 {
@@ -375,8 +370,8 @@ cmPolicies::PolicyMap::Get(cmPolicies::PolicyID id) const
 void cmPolicies::PolicyMap::Set(cmPolicies::PolicyID id,
                                 cmPolicies::PolicyStatus status)
 {
-  this->UNDEFINED.reset(id);
   this->OLD[id] = (status == cmPolicies::OLD);
+  this->WARN[id] = (status == cmPolicies::WARN);
   this->NEW[id] = (status == cmPolicies::NEW);
   this->REQUIRED_ALWAYS[id] = (status == cmPolicies::REQUIRED_ALWAYS);
   this->REQUIRED_IF_USED[id] = (status == cmPolicies::REQUIRED_IF_USED);
@@ -384,10 +379,12 @@ void cmPolicies::PolicyMap::Set(cmPolicies::PolicyID id,
 
 bool cmPolicies::PolicyMap::IsDefined(cmPolicies::PolicyID id) const
 {
-  return !this->UNDEFINED[id];
+  return this->OLD[id] || this->WARN[id] || this->NEW[id]
+      || this->REQUIRED_ALWAYS[id] || this->REQUIRED_IF_USED[id];
 }
 
 bool cmPolicies::PolicyMap::IsEmpty() const
 {
-  return !this->UNDEFINED.none();
+  return this->OLD.none() && this->WARN.none() && this->NEW.none()
+      && this->REQUIRED_ALWAYS.none() && this->REQUIRED_IF_USED.none();
 }
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 00d857a..8c72dfe 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -281,15 +281,14 @@ public:
   /** Represent a set of policy values.  */
   struct PolicyMap
   {
-    PolicyMap();
     PolicyStatus Get(PolicyID id) const;
     void Set(PolicyID id, PolicyStatus status);
     bool IsDefined(PolicyID id) const;
     bool IsEmpty() const;
 
   private:
-    std::bitset<cmPolicies::CMPCOUNT> UNDEFINED;
     std::bitset<cmPolicies::CMPCOUNT> OLD;
+    std::bitset<cmPolicies::CMPCOUNT> WARN;
     std::bitset<cmPolicies::CMPCOUNT> NEW;
     std::bitset<cmPolicies::CMPCOUNT> REQUIRED_IF_USED;
     std::bitset<cmPolicies::CMPCOUNT> REQUIRED_ALWAYS;

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

Summary of changes:
 Source/cmCommandArgumentParserHelper.h |    8 ++++----
 Source/cmComputeComponentGraph.h       |    4 ++--
 Source/cmGlobalGenerator.h             |   14 ++++++++------
 Source/cmGraphVizWriter.cxx            |    2 +-
 Source/cmGraphVizWriter.h              |   15 +++++++--------
 Source/cmInstallFilesGenerator.cxx     |    6 ++++--
 Source/cmInstallFilesGenerator.h       |    2 +-
 Source/cmInstallTargetGenerator.cxx    |    4 +++-
 Source/cmInstallTargetGenerator.h      |    6 ++----
 Source/cmOrderDirectories.h            |    5 ++---
 Source/cmProcessTools.cxx              |    2 +-
 Source/cmProcessTools.h                |    6 +++---
 Source/cmQtAutoGenerators.h            |    3 +--
 13 files changed, 39 insertions(+), 38 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list