[Cmake-commits] CMake branch, next, updated. v3.2.1-1834-gc009d68

Stephen Kelly steveire at gmail.com
Mon Apr 13 15:49:09 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  c009d6847b4f82db1d85cdd88b67f664b83ed791 (commit)
       via  de486a5ab283a9767dc4bed024dee24e2ca4344e (commit)
       via  36dc8942b55f876671168cd5f500939b0aa11038 (commit)
       via  bc294599074e6a53b6cfbfb6555b88428c7c1164 (commit)
       via  9609ba5a5aa05ffbb7690853ceecc9902cc68eb8 (commit)
       via  b320cfb93b88aed2881fc134a822feb3e94c7b05 (commit)
       via  1e8ad9c0d80bdf50f0336e3bc2de50b40be1a6d2 (commit)
       via  96f8c5f9a3bd60f553af054b43e06ce4864269e0 (commit)
       via  97e53ebb3cd728e6091f93cb7d4eac91ae417bdb (commit)
       via  1e738bcf9c7952bc9ae9bfb1be831c9f16998f54 (commit)
       via  62854e9966a3fe308cff4a76c89f6bf72f76551c (commit)
       via  db8425be18439c899c08294dde117cc137c75d23 (commit)
       via  74de9a734c92288fb3e602be0d1c967b33b67443 (commit)
       via  b159bff732d4e34a683edd1740604428049d1819 (commit)
      from  c167c897a95576f0b0bddca12433decb157ea4b2 (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=c009d6847b4f82db1d85cdd88b67f664b83ed791
commit c009d6847b4f82db1d85cdd88b67f664b83ed791
Merge: c167c89 de486a5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Apr 13 15:49:07 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Apr 13 15:49:07 2015 -0400

    Merge topic 'port-global-properties-to-cmState' into next
    
    de486a5a Port Global property interaction to cmState.
    36dc8942 Move property initialization to cmState.
    bc294599 Move global properties to cmState.
    9609ba5a cmake: Remove the happy global property scope pattern.
    b320cfb9 cmake: Remove unused cmCommand methods.
    1e8ad9c0 Port cmCommand consumers to cmState.
    96f8c5f9 cmState: Move cmCommand-related methods from cmake class.
    97e53ebb cmake: Simplify command clean up loop.
    1e738bcf cmake: Simplify RemoveUnscriptableCommands algorithm.
    62854e99 cmState: Move try_compile state from cmake class.
    db8425be cmake: Get enabled languages from cmState.
    74de9a73 cmGlobalGenerator: Delegate storage of enabled languages to cmState.
    b159bff7 Move property definition to cmState.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de486a5ab283a9767dc4bed024dee24e2ca4344e
commit de486a5ab283a9767dc4bed024dee24e2ca4344e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Apr 11 14:15:55 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 21:35:20 2015 +0200

    Port Global property interaction to cmState.

diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 4cdcd45..1e12f15 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -17,6 +17,7 @@
 #include "cmGeneratedFileStream.h"
 #include "cmCTest.h"
 #include "cmXMLParser.h"
+#include "cmState.h"
 
 #include <cmsys/Process.h>
 #include <cmsys/Base64.h>
@@ -1132,7 +1133,7 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
   cmCTestScriptHandler* ch =
     static_cast<cmCTestScriptHandler*>(this->CTest->GetHandler("script"));
   cmake* cm =  ch->GetCMake();
-  const char* subproject = cm->GetProperty("SubProject");
+  const char* subproject = cm->GetState()->GetGlobalProperty("SubProject");
   // TODO: Encode values for a URL instead of trusting caller.
   std::ostringstream str;
   str << "project="
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index edf82bd..74e1a93 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -12,6 +12,7 @@
 #include "cmAddLibraryCommand.h"
 
 #include "cmake.h"
+#include "cmState.h"
 
 // cmLibraryCommand
 bool cmAddLibraryCommand
@@ -330,7 +331,7 @@ bool cmAddLibraryCommand
     yet its linker language. */
   if ((type == cmTarget::SHARED_LIBRARY ||
        type == cmTarget::MODULE_LIBRARY) &&
-       (this->Makefile->GetCMakeInstance()->GetPropertyAsBool(
+       (this->Makefile->GetState()->GetGlobalPropertyAsBool(
                                       "TARGET_SUPPORTS_SHARED_LIBS") == false))
     {
     std::ostringstream w;
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index d54a651..cd2cd7c 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -27,6 +27,7 @@
 #include "cmCTestCommand.h"
 #include "cmCTestStartCommand.h"
 #include "cmAlgorithms.h"
+#include "cmState.h"
 
 #include "cmCTestBuildHandler.h"
 #include "cmCTestBuildAndTestHandler.h"
@@ -1558,12 +1559,14 @@ void cmCTest::AddSiteProperties(std::ostream& ostr)
     return;
     }
   // This code should go when cdash is changed to use labels only
-  const char* subproject = cm->GetProperty("SubProject");
+  const char* subproject = cm->GetState()
+                             ->GetGlobalProperty("SubProject");
   if(subproject)
     {
     ostr << "<Subproject name=\"" << subproject << "\">\n";
     const char* labels =
-      ch->GetCMake()->GetProperty("SubProjectLabels");
+      ch->GetCMake()->GetState()
+                    ->GetGlobalProperty("SubProjectLabels");
     if(labels)
       {
       ostr << "  <Labels>\n";
@@ -1581,7 +1584,7 @@ void cmCTest::AddSiteProperties(std::ostream& ostr)
     }
 
   // This code should stay when cdash only does label based sub-projects
-  const char* label = cm->GetProperty("Label");
+  const char* label = cm->GetState()->GetGlobalProperty("Label");
   if(label)
     {
     ostr << "<Labels>\n";
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 8880667..83d38ef 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -15,6 +15,7 @@
 #include "cmOrderDirectories.h"
 
 #include "cmGlobalGenerator.h"
+#include "cmState.h"
 #include "cmLocalGenerator.h"
 #include "cmMakefile.h"
 #include "cmTarget.h"
@@ -250,8 +251,8 @@ cmComputeLinkInformation
   this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance();
 
   // Check whether to recognize OpenBSD-style library versioned names.
-  this->OpenBSD = this->Makefile->GetCMakeInstance()
-    ->GetPropertyAsBool("FIND_LIBRARY_USE_OPENBSD_VERSIONING");
+  this->OpenBSD = this->Makefile->GetState()
+            ->GetGlobalPropertyAsBool("FIND_LIBRARY_USE_OPENBSD_VERSIONING");
 
   // The configuration being linked.
   this->Config = config;
@@ -796,9 +797,8 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item,
 void cmComputeLinkInformation::ComputeLinkTypeInfo()
 {
   // Check whether archives may actually be shared libraries.
-  this->ArchivesMayBeShared =
-    this->CMakeInstance->GetPropertyAsBool(
-      "TARGET_ARCHIVES_MAY_BE_SHARED_LIBS");
+  this->ArchivesMayBeShared = this->CMakeInstance->GetState()
+              ->GetGlobalPropertyAsBool("TARGET_ARCHIVES_MAY_BE_SHARED_LIBS");
 
   // First assume we cannot do link type stuff.
   this->LinkTypeEnabled = false;
@@ -1527,9 +1527,10 @@ void cmComputeLinkInformation::HandleBadFullItem(std::string const& item,
       // Print the warning at most once for this item.
       std::string wid = "CMP0008-WARNING-GIVEN-";
       wid += item;
-      if(!this->CMakeInstance->GetPropertyAsBool(wid))
+      if(!this->CMakeInstance->GetState()
+              ->GetGlobalPropertyAsBool(wid))
         {
-        this->CMakeInstance->SetProperty(wid, "1");
+        this->CMakeInstance->GetState()->SetGlobalProperty(wid, "1");
         std::ostringstream w;
         w << (this->Makefile->GetPolicies()
               ->GetPolicyWarning(cmPolicies::CMP0008)) << "\n"
@@ -1576,9 +1577,11 @@ bool cmComputeLinkInformation::FinishLinkerSearchDirectories()
   switch(this->Target->GetPolicyStatusCMP0003())
     {
     case cmPolicies::WARN:
-      if(!this->CMakeInstance->GetPropertyAsBool("CMP0003-WARNING-GIVEN"))
+      if(!this->CMakeInstance->GetState()
+              ->GetGlobalPropertyAsBool("CMP0003-WARNING-GIVEN"))
         {
-        this->CMakeInstance->SetProperty("CMP0003-WARNING-GIVEN", "1");
+        this->CMakeInstance->GetState()
+            ->SetGlobalProperty("CMP0003-WARNING-GIVEN", "1");
         std::ostringstream w;
         this->PrintLinkPolicyDiagnosis(w);
         this->CMakeInstance->IssueMessage(cmake::AUTHOR_WARNING, w.str(),
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index bbffd5d..11056cd 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -15,6 +15,7 @@
 #include "cmGlobalGenerator.h"
 #include "cmLocalGenerator.h"
 #include "cmMakefile.h"
+#include "cmState.h"
 #include "cmSystemTools.h"
 #include "cmSourceFile.h"
 #include "cmTarget.h"
@@ -98,8 +99,10 @@ cmComputeTargetDepends::cmComputeTargetDepends(cmGlobalGenerator* gg)
 {
   this->GlobalGenerator = gg;
   cmake* cm = this->GlobalGenerator->GetCMakeInstance();
-  this->DebugMode = cm->GetPropertyAsBool("GLOBAL_DEPENDS_DEBUG_MODE");
-  this->NoCycles = cm->GetPropertyAsBool("GLOBAL_DEPENDS_NO_CYCLES");
+  this->DebugMode = cm->GetState()
+                      ->GetGlobalPropertyAsBool("GLOBAL_DEPENDS_DEBUG_MODE");
+  this->NoCycles = cm->GetState()
+                      ->GetGlobalPropertyAsBool("GLOBAL_DEPENDS_NO_CYCLES");
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 16d5119..2aa4d93 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -469,8 +469,8 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
     fout << "\t\t<nature>" << *nit << "</nature>\n";
     }
 
-  if (const char *extraNaturesProp = mf->GetCMakeInstance()->
-        GetProperty("ECLIPSE_EXTRA_NATURES"))
+  if (const char *extraNaturesProp = mf->GetState()
+        ->GetGlobalProperty("ECLIPSE_EXTRA_NATURES"))
     {
     std::vector<std::string> extraNatures;
     cmSystemTools::ExpandListArgument(extraNaturesProp, extraNatures);
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index ef8340b..507d011 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -54,8 +54,8 @@ bool cmFindLibraryCommand
       }
     }
 
-  if(this->Makefile->GetCMakeInstance()
-     ->GetPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS"))
+  if(this->Makefile->GetState()
+         ->GetGlobalPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS"))
     {
     // add special 64 bit paths if this is a 64 bit compile.
     if(this->Makefile->PlatformIs64Bit())
@@ -226,8 +226,8 @@ cmFindLibraryHelper::cmFindLibraryHelper(cmMakefile* mf):
 
   // Check whether to use OpenBSD-style library version comparisons.
   this->OpenBSD =
-    this->Makefile->GetCMakeInstance()
-    ->GetPropertyAsBool("FIND_LIBRARY_USE_OPENBSD_VERSIONING");
+    this->Makefile->GetState()
+        ->GetGlobalPropertyAsBool("FIND_LIBRARY_USE_OPENBSD_VERSIONING");
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index b32f5fd..e1074b0 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -120,8 +120,8 @@ bool cmFindPackageCommand
 
   // Lookup whether lib64 paths should be used.
   if(this->Makefile->PlatformIs64Bit() &&
-     this->Makefile->GetCMakeInstance()
-     ->GetPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS"))
+     this->Makefile->GetState()
+         ->GetGlobalPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS"))
     {
     this->UseLib64Paths = true;
     }
@@ -1015,8 +1015,8 @@ bool cmFindPackageCommand::ReadListFile(const char* f, PolicyScopeRule psr)
 void cmFindPackageCommand::AppendToFoundProperty(bool found)
 {
   std::vector<std::string> foundContents;
-  const char *foundProp =
-             this->Makefile->GetCMakeInstance()->GetProperty("PACKAGES_FOUND");
+  const char *foundProp = this->Makefile->GetState()
+                              ->GetGlobalProperty("PACKAGES_FOUND");
   if (foundProp && *foundProp)
     {
     std::string tmp = foundProp;
@@ -1032,7 +1032,8 @@ void cmFindPackageCommand::AppendToFoundProperty(bool found)
 
   std::vector<std::string> notFoundContents;
   const char *notFoundProp =
-         this->Makefile->GetCMakeInstance()->GetProperty("PACKAGES_NOT_FOUND");
+         this->Makefile->GetState()
+             ->GetGlobalProperty("PACKAGES_NOT_FOUND");
   if (notFoundProp && *notFoundProp)
     {
     std::string tmp = notFoundProp;
@@ -1057,12 +1058,12 @@ void cmFindPackageCommand::AppendToFoundProperty(bool found)
 
 
   std::string tmp = cmJoin(foundContents, ";");
-  this->Makefile->GetCMakeInstance()->SetProperty("PACKAGES_FOUND",
-                                                  tmp.c_str());
+  this->Makefile->GetState()
+      ->SetGlobalProperty("PACKAGES_FOUND", tmp.c_str());
 
   tmp = cmJoin(notFoundContents, ";");
-  this->Makefile->GetCMakeInstance()->SetProperty("PACKAGES_NOT_FOUND",
-                                                  tmp.c_str());
+  this->Makefile->GetState()
+      ->SetGlobalProperty("PACKAGES_NOT_FOUND", tmp.c_str());
 }
 
 //----------------------------------------------------------------------------
@@ -1071,8 +1072,8 @@ void cmFindPackageCommand::AppendSuccessInformation()
   {
   std::string transitivePropName = "_CMAKE_";
   transitivePropName += this->Name + "_TRANSITIVE_DEPENDENCY";
-  this->Makefile->GetCMakeInstance()
-                ->SetProperty(transitivePropName, "False");
+  this->Makefile->GetState()
+                ->SetGlobalProperty(transitivePropName, "False");
   }
   std::string found = this->Name;
   found += "_FOUND";
@@ -1090,8 +1091,8 @@ void cmFindPackageCommand::AppendSuccessInformation()
   std::string quietInfoPropName = "_CMAKE_";
   quietInfoPropName += this->Name;
   quietInfoPropName += "_QUIET";
-  this->Makefile->GetCMakeInstance()->SetProperty(quietInfoPropName,
-                                               this->Quiet ? "TRUE" : "FALSE");
+  this->Makefile->GetState()
+      ->SetGlobalProperty(quietInfoPropName, this->Quiet ? "TRUE" : "FALSE");
 
   // set a global property to record the required version of this package
   std::string versionInfoPropName = "_CMAKE_";
@@ -1104,15 +1105,15 @@ void cmFindPackageCommand::AppendSuccessInformation()
     versionInfo += " ";
     versionInfo += this->Version;
     }
-  this->Makefile->GetCMakeInstance()->SetProperty(versionInfoPropName,
-                                                  versionInfo.c_str());
+  this->Makefile->GetState()
+      ->SetGlobalProperty(versionInfoPropName, versionInfo.c_str());
   if (this->Required)
     {
     std::string requiredInfoPropName = "_CMAKE_";
     requiredInfoPropName += this->Name;
     requiredInfoPropName += "_TYPE";
-    this->Makefile->GetCMakeInstance()->SetProperty(
-                                     requiredInfoPropName, "REQUIRED");
+    this->Makefile->GetState()
+        ->SetGlobalProperty(requiredInfoPropName, "REQUIRED");
     }
 
 
diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx
index 85aa31f..b035750 100644
--- a/Source/cmGetCMakePropertyCommand.cxx
+++ b/Source/cmGetCMakePropertyCommand.cxx
@@ -14,6 +14,7 @@
 #include "cmGlobalGenerator.h"
 #include "cmLocalGenerator.h"
 #include "cmake.h"
+#include "cmState.h"
 #include "cmAlgorithms.h"
 
 // cmGetCMakePropertyCommand
@@ -53,7 +54,8 @@ bool cmGetCMakePropertyCommand
   else
     {
     const char *prop =
-      this->Makefile->GetCMakeInstance()->GetProperty(args[1]);
+      this->Makefile->GetState()
+          ->GetGlobalProperty(args[1]);
     if (prop)
       {
       output = prop;
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index a8481ad..3e1d08e 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -237,7 +237,8 @@ bool cmGetPropertyCommand::HandleGlobalMode()
 
   // Get the property.
   cmake* cm = this->Makefile->GetCMakeInstance();
-  return this->StoreResult(cm->GetProperty(this->PropertyName));
+  return this->StoreResult(cm->GetState()
+             ->GetGlobalProperty(this->PropertyName));
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 56a0a45..ab044c1 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -200,7 +200,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
     if (cnameString != pathString)
       {
       const char* cvars =
-        this->GetCMakeInstance()->GetProperty(
+        this->GetCMakeInstance()->GetState()->GetGlobalProperty(
           "__CMAKE_DELETE_CACHE_CHANGE_VARS_");
       if(cvars)
         {
@@ -210,7 +210,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
       changeVars += langComp;
       changeVars += ";";
       changeVars += cname;
-      this->GetCMakeInstance()->SetProperty(
+      this->GetCMakeInstance()->GetState()->SetGlobalProperty(
         "__CMAKE_DELETE_CACHE_CHANGE_VARS_",
         changeVars.c_str());
       }
@@ -1170,8 +1170,8 @@ void cmGlobalGenerator::AddCMP0042WarnTarget(const std::string& target)
 bool cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const
 {
   // If the property is not enabled then okay.
-  if(!this->CMakeInstance
-     ->GetPropertyAsBool("ALLOW_DUPLICATE_CUSTOM_TARGETS"))
+  if(!this->CMakeInstance->GetState()
+     ->GetGlobalPropertyAsBool("ALLOW_DUPLICATE_CUSTOM_TARGETS"))
     {
     return true;
     }
@@ -2391,8 +2391,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
 //----------------------------------------------------------------------------
 const char* cmGlobalGenerator::GetPredefinedTargetsFolder()
 {
-  const char* prop =
-    this->GetCMakeInstance()->GetProperty("PREDEFINED_TARGETS_FOLDER");
+  const char* prop = this->GetCMakeInstance()->GetState()
+                         ->GetGlobalProperty("PREDEFINED_TARGETS_FOLDER");
 
   if (prop)
     {
@@ -2405,7 +2405,8 @@ const char* cmGlobalGenerator::GetPredefinedTargetsFolder()
 //----------------------------------------------------------------------------
 bool cmGlobalGenerator::UseFolderProperty()
 {
-  const char* prop = this->GetCMakeInstance()->GetProperty("USE_FOLDERS");
+  const char* prop = this->GetCMakeInstance()->GetState()
+                         ->GetGlobalProperty("USE_FOLDERS");
 
   // If this property is defined, let the setter turn this on or off...
   //
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 124e849..645d32a 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -18,6 +18,7 @@
 #include "cmGeneratedFileStream.h"
 #include "cmSourceFile.h"
 #include "cmake.h"
+#include "cmState.h"
 
 #include <assert.h>
 
@@ -234,7 +235,8 @@ void cmLocalNinjaGenerator::WritePools(std::ostream& os)
 {
   cmGlobalNinjaGenerator::WriteDivider(os);
 
-  const char* jobpools = this->GetCMakeInstance()->GetProperty("JOB_POOLS");
+  const char* jobpools = this->GetCMakeInstance()->GetState()
+                             ->GetGlobalProperty("JOB_POOLS");
   if (jobpools)
     {
     cmGlobalNinjaGenerator::WriteComment(os,
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 2fe1e33..205508b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4239,7 +4239,7 @@ const char *cmMakefile::GetProperty(const std::string& prop,
       return this->LocalGenerator->GetParent()->GetMakefile()->
         GetProperty(prop, scope);
       }
-    return this->GetCMakeInstance()->GetProperty(prop);
+    return this->GetState()->GetGlobalProperty(prop);
     }
 
   return retVal;
@@ -4585,7 +4585,8 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
         this->LocalGenerator->GetGlobalGenerator()->GetCMakeInstance();
       if(isCustom && existing->GetType() == cmTarget::UTILITY &&
          this != existing->GetMakefile() &&
-         cm->GetPropertyAsBool("ALLOW_DUPLICATE_CUSTOM_TARGETS"))
+         cm->GetState()
+           ->GetGlobalPropertyAsBool("ALLOW_DUPLICATE_CUSTOM_TARGETS"))
         {
         return true;
         }
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index bd9c579..0076caf 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -20,6 +20,7 @@
 #include "cmSourceFile.h"
 #include "cmTarget.h"
 #include "cmake.h"
+#include "cmState.h"
 #include "cmComputeLinkInformation.h"
 #include "cmCustomCommandGenerator.h"
 #include "cmGeneratorExpression.h"
@@ -51,7 +52,8 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target)
   this->GeneratorTarget = this->GlobalGenerator->GetGeneratorTarget(target);
   cmake* cm = this->GlobalGenerator->GetCMakeInstance();
   this->NoRuleMessages = false;
-  if(const char* ruleStatus = cm->GetProperty("RULE_MESSAGES"))
+  if(const char* ruleStatus = cm->GetState()
+                                ->GetGlobalProperty("RULE_MESSAGES"))
     {
     this->NoRuleMessages = cmSystemTools::IsOff(ruleStatus);
     }
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 4cb49c8..4d0b3f4 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -16,6 +16,7 @@
 #include "cmMakefile.h"
 #include "cmSourceFile.h"
 #include "cmSystemTools.h"
+#include "cmState.h"
 #include "cmAlgorithms.h"
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
@@ -472,12 +473,12 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
       }
 
     // Set target folder
-    const char* autogenFolder = makefile->GetCMakeInstance()->GetProperty(
-                                                     "AUTOMOC_TARGETS_FOLDER");
+    const char* autogenFolder = makefile->GetState()
+                                ->GetGlobalProperty("AUTOMOC_TARGETS_FOLDER");
     if (!autogenFolder)
       {
-      autogenFolder = makefile->GetCMakeInstance()->GetProperty(
-                                                     "AUTOGEN_TARGETS_FOLDER");
+      autogenFolder = makefile->GetState()
+                                ->GetGlobalProperty("AUTOGEN_TARGETS_FOLDER");
       }
     if (autogenFolder && *autogenFolder)
       {
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 96b6a22..a542a24 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1152,7 +1152,8 @@ int cmake::HandleDeleteCacheVariables(const std::string& var)
   std::vector<std::string> argsSplit;
   cmSystemTools::ExpandListArgument(std::string(var), argsSplit, true);
   // erase the property to avoid infinite recursion
-  this->SetProperty("__CMAKE_DELETE_CACHE_CHANGE_VARS_", "");
+  this->State
+      ->SetGlobalProperty("__CMAKE_DELETE_CACHE_CHANGE_VARS_", "");
   if(this->State->GetIsInTryCompile())
     {
     return 0;
@@ -1229,8 +1230,8 @@ int cmake::Configure()
       }
     }
   int ret = this->ActualConfigure();
-  const char* delCacheVars =
-    this->GetProperty("__CMAKE_DELETE_CACHE_CHANGE_VARS_");
+  const char* delCacheVars = this->State
+                    ->GetGlobalProperty("__CMAKE_DELETE_CACHE_CHANGE_VARS_");
   if(delCacheVars && delCacheVars[0] != 0)
     {
     return this->HandleDeleteCacheVariables(delCacheVars);
@@ -1505,7 +1506,7 @@ int cmake::ActualConfigure()
 
   cmMakefile* mf=this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile();
   if (mf->IsOn("CTEST_USE_LAUNCHERS")
-              && !this->GetProperty("RULE_LAUNCH_COMPILE"))
+              && !this->State->GetGlobalProperty("RULE_LAUNCH_COMPILE"))
     {
     cmSystemTools::Error("CTEST_USE_LAUNCHERS is enabled, but the "
                         "RULE_LAUNCH_COMPILE global property is not defined.\n"
@@ -2194,7 +2195,7 @@ const char *cmake::GetProperty(const std::string& prop)
 
 bool cmake::GetPropertyAsBool(const std::string& prop)
 {
-  return cmSystemTools::IsOn(this->GetProperty(prop));
+  return this->State->GetGlobalPropertyAsBool(prop);
 }
 
 cmInstalledFile *cmake::GetOrCreateInstalledFile(
@@ -2590,7 +2591,8 @@ void cmake::IssueMessage(cmake::MessageType t, std::string const& text,
 std::vector<std::string> cmake::GetDebugConfigs()
 {
   std::vector<std::string> configs;
-  if(const char* config_list = this->GetProperty("DEBUG_CONFIGURATIONS"))
+  if(const char* config_list =
+                      this->State->GetGlobalProperty("DEBUG_CONFIGURATIONS"))
     {
     // Expand the specified list and convert to upper-case.
     cmSystemTools::ExpandListArgument(config_list, configs);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=36dc8942b55f876671168cd5f500939b0aa11038
commit 36dc8942b55f876671168cd5f500939b0aa11038
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Apr 6 19:47:21 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 21:35:19 2015 +0200

    Move property initialization to cmState.

diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index e46846e..96f8a51 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -22,6 +22,7 @@ cmState::cmState(cmake* cm)
   : CMakeInstance(cm),
     IsInTryCompile(false)
 {
+  this->Initialize();
 }
 
 cmState::~cmState()
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 7d02505..96b6a22 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -136,8 +136,6 @@ cmake::cmake()
   this->Policies = new cmPolicies();
   this->State = new cmState(this);
 
-  this->InitializeProperties();
-
 #ifdef __APPLE__
   struct rlimit rlp;
   if(!getrlimit(RLIMIT_STACK, &rlp))
@@ -186,14 +184,9 @@ cmake::~cmake()
   delete this->FileComparison;
 }
 
-void cmake::InitializeProperties()
-{
-  this->State->Initialize();
-}
-
 void cmake::CleanupCommandsAndMacros()
 {
-  this->InitializeProperties();
+  this->State->Initialize();
   this->State->RemoveUserDefinedCommands();
 }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc294599074e6a53b6cfbfb6555b88428c7c1164
commit bc294599074e6a53b6cfbfb6555b88428c7c1164
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Apr 11 14:17:46 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 21:35:19 2015 +0200

    Move global properties to cmState.

diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 17b6cf2..e46846e 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -191,6 +191,8 @@ void cmState::RemoveCacheEntryProperty(std::string const& key,
 
 void cmState::Initialize()
 {
+  this->GlobalProperties.clear();
+
   this->PropertyDefinitions.clear();
   this->DefineProperty
     ("RULE_LAUNCH_COMPILE", cmProperty::DIRECTORY,
@@ -384,3 +386,60 @@ void cmState::RemoveUserDefinedCommands()
       }
     }
 }
+
+void cmState::SetGlobalProperty(const std::string& prop, const char* value)
+{
+  this->GlobalProperties.SetProperty(prop, value, cmProperty::GLOBAL);
+}
+
+void cmState::AppendGlobalProperty(const std::string& prop,
+                                   const char* value, bool asString)
+{
+  this->GlobalProperties.AppendProperty(prop, value,
+                                        cmProperty::GLOBAL, asString);
+}
+
+const char *cmState::GetGlobalProperty(const std::string& prop)
+{
+  // watch for special properties
+  std::string output = "";
+  if ( prop == "CACHE_VARIABLES" )
+    {
+    std::vector<std::string> cacheKeys = this->GetCacheEntryKeys();
+    this->SetGlobalProperty("CACHE_VARIABLES", cmJoin(cacheKeys, ";").c_str());
+    }
+  else if ( prop == "COMMANDS" )
+    {
+    std::vector<std::string> commands = this->GetCommandNames();
+    this->SetGlobalProperty("COMMANDS", cmJoin(commands, ";").c_str());
+    }
+  else if ( prop == "IN_TRY_COMPILE" )
+    {
+    this->SetGlobalProperty("IN_TRY_COMPILE",
+                      this->IsInTryCompile ? "1" : "0");
+    }
+  else if ( prop == "ENABLED_LANGUAGES" )
+    {
+    std::string langs;
+    langs = cmJoin(this->EnabledLanguages, ";");
+    this->SetGlobalProperty("ENABLED_LANGUAGES", langs.c_str());
+    }
+#define STRING_LIST_ELEMENT(F) ";" #F
+  if (prop == "CMAKE_C_KNOWN_FEATURES")
+    {
+    return FOR_EACH_C_FEATURE(STRING_LIST_ELEMENT) + 1;
+    }
+  if (prop == "CMAKE_CXX_KNOWN_FEATURES")
+    {
+    return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1;
+    }
+#undef STRING_LIST_ELEMENT
+  bool dummy = false;
+  return this->GlobalProperties.GetPropertyValue(prop, cmProperty::GLOBAL,
+                                                 dummy);
+}
+
+bool cmState::GetGlobalPropertyAsBool(const std::string& prop)
+{
+  return cmSystemTools::IsOn(this->GetGlobalProperty(prop));
+}
diff --git a/Source/cmState.h b/Source/cmState.h
index a7a17ee..34b2ccf 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -14,6 +14,7 @@
 
 #include "cmStandardIncludes.h"
 #include "cmPropertyDefinitionMap.h"
+#include "cmPropertyMap.h"
 
 class cmake;
 class cmCommand;
@@ -88,10 +89,17 @@ public:
   void RemoveUserDefinedCommands();
   std::vector<std::string> GetCommandNames() const;
 
+  void SetGlobalProperty(const std::string& prop, const char *value);
+  void AppendGlobalProperty(const std::string& prop,
+                      const char *value,bool asString=false);
+  const char *GetGlobalProperty(const std::string& prop);
+  bool GetGlobalPropertyAsBool(const std::string& prop);
+
 private:
   std::map<cmProperty::ScopeType, cmPropertyDefinitionMap> PropertyDefinitions;
   std::vector<std::string> EnabledLanguages;
   std::map<std::string, cmCommand*> Commands;
+  cmPropertyMap GlobalProperties;
   cmake* CMakeInstance;
   bool IsInTryCompile;
 };
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a83596d..7d02505 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -188,8 +188,6 @@ cmake::~cmake()
 
 void cmake::InitializeProperties()
 {
-  this->Properties.clear();
-
   this->State->Initialize();
 }
 
@@ -2187,52 +2185,18 @@ void cmake::GenerateGraphViz(const char* fileName) const
 
 void cmake::SetProperty(const std::string& prop, const char* value)
 {
-  this->Properties.SetProperty(prop, value, cmProperty::GLOBAL);
+  this->State->SetGlobalProperty(prop, value);
 }
 
 void cmake::AppendProperty(const std::string& prop,
                            const char* value, bool asString)
 {
-  this->Properties.AppendProperty(prop, value, cmProperty::GLOBAL, asString);
+  this->State->AppendGlobalProperty(prop, value, asString);
 }
 
 const char *cmake::GetProperty(const std::string& prop)
 {
-  // watch for special properties
-  std::string output = "";
-  if ( prop == "CACHE_VARIABLES" )
-    {
-    std::vector<std::string> cacheKeys = this->State->GetCacheEntryKeys();
-    this->SetProperty("CACHE_VARIABLES", cmJoin(cacheKeys, ";").c_str());
-    }
-  else if ( prop == "COMMANDS" )
-    {
-    std::vector<std::string> commands = this->State->GetCommandNames();
-    this->SetProperty("COMMANDS", cmJoin(commands, ";").c_str());
-    }
-  else if ( prop == "IN_TRY_COMPILE" )
-    {
-    this->SetProperty("IN_TRY_COMPILE",
-                      this->State->GetIsInTryCompile() ? "1" : "0");
-    }
-  else if ( prop == "ENABLED_LANGUAGES" )
-    {
-    std::string langs;
-    langs = cmJoin(this->State->GetEnabledLanguages(), ";");
-    this->SetProperty("ENABLED_LANGUAGES", langs.c_str());
-    }
-#define STRING_LIST_ELEMENT(F) ";" #F
-  if (prop == "CMAKE_C_KNOWN_FEATURES")
-    {
-    return FOR_EACH_C_FEATURE(STRING_LIST_ELEMENT) + 1;
-    }
-  if (prop == "CMAKE_CXX_KNOWN_FEATURES")
-    {
-    return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1;
-    }
-#undef STRING_LIST_ELEMENT
-  bool dummy = false;
-  return this->Properties.GetPropertyValue(prop, cmProperty::GLOBAL, dummy);
+  return this->State->GetGlobalProperty(prop);
 }
 
 bool cmake::GetPropertyAsBool(const std::string& prop)
diff --git a/Source/cmake.h b/Source/cmake.h
index 27f28ac..352850d 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -15,7 +15,6 @@
 
 #include "cmListFileCache.h"
 #include "cmSystemTools.h"
-#include "cmPropertyMap.h"
 #include "cmInstalledFile.h"
 #include "cmCacheManager.h"
 #include "cmState.h"
@@ -336,7 +335,6 @@ protected:
   void RunCheckForUnusedVariables();
   void InitializeProperties();
   int HandleDeleteCacheVariables(const std::string& var);
-  cmPropertyMap Properties;
 
   typedef
      cmExternalMakefileProjectGenerator* (*CreateExtraGeneratorFunctionType)();

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9609ba5a5aa05ffbb7690853ceecc9902cc68eb8
commit 9609ba5a5aa05ffbb7690853ceecc9902cc68eb8
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Apr 13 21:20:25 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 21:32:05 2015 +0200

    cmake: Remove the happy global property scope pattern.
    
    Global properties are already global in scope, so remove the
    overload for specifying it and port users of the API.
    
    The call from cmMakefile::GetProperty can be simplified because
    the scope is only used during chaining, and there is no further
    chaining after processing global properties.

diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index d585863..4cdcd45 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -1132,7 +1132,7 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
   cmCTestScriptHandler* ch =
     static_cast<cmCTestScriptHandler*>(this->CTest->GetHandler("script"));
   cmake* cm =  ch->GetCMake();
-  const char* subproject = cm->GetProperty("SubProject", cmProperty::GLOBAL);
+  const char* subproject = cm->GetProperty("SubProject");
   // TODO: Encode values for a URL instead of trusting caller.
   std::ostringstream str;
   str << "project="
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 6715638..d54a651 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1558,12 +1558,12 @@ void cmCTest::AddSiteProperties(std::ostream& ostr)
     return;
     }
   // This code should go when cdash is changed to use labels only
-  const char* subproject = cm->GetProperty("SubProject", cmProperty::GLOBAL);
+  const char* subproject = cm->GetProperty("SubProject");
   if(subproject)
     {
     ostr << "<Subproject name=\"" << subproject << "\">\n";
     const char* labels =
-      ch->GetCMake()->GetProperty("SubProjectLabels", cmProperty::GLOBAL);
+      ch->GetCMake()->GetProperty("SubProjectLabels");
     if(labels)
       {
       ostr << "  <Labels>\n";
@@ -1581,7 +1581,7 @@ void cmCTest::AddSiteProperties(std::ostream& ostr)
     }
 
   // This code should stay when cdash only does label based sub-projects
-  const char* label = cm->GetProperty("Label", cmProperty::GLOBAL);
+  const char* label = cm->GetProperty("Label");
   if(label)
     {
     ostr << "<Labels>\n";
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 35b70e8..16d5119 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -470,7 +470,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
     }
 
   if (const char *extraNaturesProp = mf->GetCMakeInstance()->
-        GetProperty("ECLIPSE_EXTRA_NATURES", cmProperty::GLOBAL))
+        GetProperty("ECLIPSE_EXTRA_NATURES"))
     {
     std::vector<std::string> extraNatures;
     cmSystemTools::ExpandListArgument(extraNaturesProp, extraNatures);
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 640c1b3..124e849 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -234,8 +234,7 @@ void cmLocalNinjaGenerator::WritePools(std::ostream& os)
 {
   cmGlobalNinjaGenerator::WriteDivider(os);
 
-  const char* jobpools = this->GetCMakeInstance()
-                               ->GetProperty("JOB_POOLS", cmProperty::GLOBAL);
+  const char* jobpools = this->GetCMakeInstance()->GetProperty("JOB_POOLS");
   if (jobpools)
     {
     cmGlobalNinjaGenerator::WriteComment(os,
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index be3bcdc..2fe1e33 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4239,7 +4239,7 @@ const char *cmMakefile::GetProperty(const std::string& prop,
       return this->LocalGenerator->GetParent()->GetMakefile()->
         GetProperty(prop, scope);
       }
-    return this->GetCMakeInstance()->GetProperty(prop,scope);
+    return this->GetCMakeInstance()->GetProperty(prop);
     }
 
   return retVal;
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index e286295..a83596d 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1514,7 +1514,7 @@ int cmake::ActualConfigure()
 
   cmMakefile* mf=this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile();
   if (mf->IsOn("CTEST_USE_LAUNCHERS")
-              && !this->GetProperty("RULE_LAUNCH_COMPILE", cmProperty::GLOBAL))
+              && !this->GetProperty("RULE_LAUNCH_COMPILE"))
     {
     cmSystemTools::Error("CTEST_USE_LAUNCHERS is enabled, but the "
                         "RULE_LAUNCH_COMPILE global property is not defined.\n"
@@ -2198,12 +2198,6 @@ void cmake::AppendProperty(const std::string& prop,
 
 const char *cmake::GetProperty(const std::string& prop)
 {
-  return this->GetProperty(prop, cmProperty::GLOBAL);
-}
-
-const char *cmake::GetProperty(const std::string& prop,
-                               cmProperty::ScopeType scope)
-{
   // watch for special properties
   std::string output = "";
   if ( prop == "CACHE_VARIABLES" )
@@ -2238,7 +2232,7 @@ const char *cmake::GetProperty(const std::string& prop,
     }
 #undef STRING_LIST_ELEMENT
   bool dummy = false;
-  return this->Properties.GetPropertyValue(prop, scope, dummy);
+  return this->Properties.GetPropertyValue(prop, cmProperty::GLOBAL, dummy);
 }
 
 bool cmake::GetPropertyAsBool(const std::string& prop)
diff --git a/Source/cmake.h b/Source/cmake.h
index 359e7bf..27f28ac 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -253,8 +253,6 @@ class cmake
   void AppendProperty(const std::string& prop,
                       const char *value,bool asString=false);
   const char *GetProperty(const std::string& prop);
-  const char *GetProperty(const std::string& prop,
-                          cmProperty::ScopeType scope);
   bool GetPropertyAsBool(const std::string& prop);
 
   ///! Get or create an cmInstalledFile instance and return a pointer to it

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b320cfb93b88aed2881fc134a822feb3e94c7b05
commit b320cfb93b88aed2881fc134a822feb3e94c7b05
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Apr 11 13:13:57 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 21:12:15 2015 +0200

    cmake: Remove unused cmCommand methods.

diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a0f813e..e286295 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -199,32 +199,6 @@ void cmake::CleanupCommandsAndMacros()
   this->State->RemoveUserDefinedCommands();
 }
 
-bool cmake::CommandExists(const std::string& name) const
-{
-  return this->State->GetCommand(name) ? true : false;
-}
-
-cmCommand *cmake::GetCommand(const std::string& name) const
-{
-  return this->State->GetCommand(name);
-}
-
-void cmake::RenameCommand(const std::string& oldName,
-                          const std::string& newName)
-{
-  this->State->RenameCommand(oldName, newName);
-}
-
-void cmake::AddCommand(cmCommand* command)
-{
-  this->State->AddCommand(command);
-}
-
-void cmake::RemoveUnscriptableCommands()
-{
-  this->State->RemoveUnscriptableCommands();
-}
-
 // Parse the args
 bool cmake::SetCacheArgs(const std::vector<std::string>& args)
 {
diff --git a/Source/cmake.h b/Source/cmake.h
index e7a8acb..359e7bf 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -24,7 +24,6 @@ class cmGlobalGeneratorFactory;
 class cmGlobalGenerator;
 class cmLocalGenerator;
 class cmMakefile;
-class cmCommand;
 class cmVariableWatch;
 class cmFileTimeComparison;
 class cmExternalMakefileProjectGenerator;
@@ -216,21 +215,6 @@ class cmake
    */
   int GetSystemInformation(std::vector<std::string>&);
 
-  /**
-   * Add a command to this cmake instance
-   */
-  void AddCommand(cmCommand* );
-  void RenameCommand(const std::string& oldName, const std::string& newName);
-  void RemoveUnscriptableCommands();
-
-  /**
-   * Get a command by its name
-   */
-  cmCommand *GetCommand(const std::string& name) const;
-
-  /** Check if a command exists. */
-  bool CommandExists(const std::string& name) const;
-
   ///! Parse command line arguments
   void SetArgs(const std::vector<std::string>&,
                bool directoriesSetBefore = false);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e8ad9c0d80bdf50f0336e3bc2de50b40be1a6d2
commit 1e8ad9c0d80bdf50f0336e3bc2de50b40be1a6d2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Apr 11 12:52:14 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 21:12:15 2015 +0200

    Port cmCommand consumers to cmState.

diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 00b23cd..a9cabf1 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -198,7 +198,7 @@ int main (int argc, char const* const* argv)
     "Read CPack config file: " << cpackConfigFile << std::endl);
 
   cmake cminst;
-  cminst.RemoveUnscriptableCommands();
+  cminst.GetState()->RemoveUnscriptableCommands();
   cmGlobalGenerator cmgg;
   cmgg.SetCMakeInstance(&cminst);
   cmsys::auto_ptr<cmLocalGenerator> cmlg(cmgg.CreateLocalGenerator());
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 3792953..783941b 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -214,7 +214,7 @@ void cmCTestScriptHandler::AddCTestCommand(cmCTestCommand* command)
   cmCTestCommand* newCom = command;
   newCom->CTest = this->CTest;
   newCom->CTestScriptHandler = this;
-  this->CMake->AddCommand(newCom);
+  this->CMake->GetState()->AddCommand(newCom);
 }
 
 int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
@@ -353,7 +353,7 @@ void cmCTestScriptHandler::CreateCMake()
 
   // remove all cmake commands which are not scriptable, since they can't be
   // used in ctest scripts
-  this->CMake->RemoveUnscriptableCommands();
+  this->CMake->GetState()->RemoveUnscriptableCommands();
 
   // add any ctest specific commands, probably should have common superclass
   // for ctest commands to clean this up. If a couple more commands are
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 0e84fbf..c50ea88 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1585,25 +1585,25 @@ void cmCTestTestHandler::GetListOfTests()
   // Add handler for ADD_TEST
   cmCTestAddTestCommand* newCom1 = new cmCTestAddTestCommand;
   newCom1->TestHandler = this;
-  cm.AddCommand(newCom1);
+  cm.GetState()->AddCommand(newCom1);
 
   // Add handler for SUBDIRS
   cmCTestSubdirCommand* newCom2 =
     new cmCTestSubdirCommand;
   newCom2->TestHandler = this;
-  cm.AddCommand(newCom2);
+  cm.GetState()->AddCommand(newCom2);
 
   // Add handler for ADD_SUBDIRECTORY
   cmCTestAddSubdirectoryCommand* newCom3 =
     new cmCTestAddSubdirectoryCommand;
   newCom3->TestHandler = this;
-  cm.AddCommand(newCom3);
+  cm.GetState()->AddCommand(newCom3);
 
   // Add handler for SET_SOURCE_FILES_PROPERTIES
   cmCTestSetTestsPropertiesCommand* newCom4
     = new cmCTestSetTestsPropertiesCommand;
   newCom4->TestHandler = this;
-  cm.AddCommand(newCom4);
+  cm.GetState()->AddCommand(newCom4);
 
   const char* testFilename;
   if( cmSystemTools::FileExists("CTestTestfile.cmake") )
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 6134c6f..77cd6c6 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -164,7 +164,7 @@ int CCONV cmIsOn(void *arg, const char* name)
 int CCONV cmCommandExists(void *arg, const char* name)
 {
   cmMakefile *mf = static_cast<cmMakefile *>(arg);
-  return static_cast<int>(mf->CommandExists(name));
+  return static_cast<int>(mf->GetState()->GetCommand(name) ? 1 : 0);
 }
 
 void CCONV cmAddDefineFlag(void *arg, const char* definition)
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index eb4f3a1..6b8cfa0 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -482,7 +482,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList &newArgs,
       if (this->IsKeyword("COMMAND", *arg) && argP1  != newArgs.end())
         {
         this->HandlePredicate(
-          this->Makefile.CommandExists(argP1->c_str()),
+          this->Makefile.GetState()->GetCommand(argP1->c_str()),
           reducible, arg, newArgs, argP1, argP2);
         }
       // does a policy exist
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index 9297688..fdd1018 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -193,9 +193,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
         }
 
       std::string newName = "_" + this->Args[0];
-      mf.GetCMakeInstance()->RenameCommand(this->Args[0],
-                                           newName);
-      mf.AddCommand(f);
+      mf.GetState()->RenameCommand(this->Args[0], newName);
+      mf.GetState()->AddCommand(f);
 
       // remove the function blocker now that the function is defined
       mf.RemoveFunctionBlocker(this, lff);
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index cdfd00c..403f7fc 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -273,7 +273,7 @@ bool cmLoadCommandCommand
     // create a function blocker and set it up
     cmLoadedCommand *f = new cmLoadedCommand();
     (*initFunction)(&f->info);
-    this->Makefile->AddCommand(f);
+    this->Makefile->GetState()->AddCommand(f);
     return true;
     }
   this->SetError("Attempt to load command failed. "
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index b7cbae6..7ac4432 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -232,9 +232,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
       f->Functions = this->Functions;
       mf.RecordPolicies(f->Policies);
       std::string newName = "_" + this->Args[0];
-      mf.GetCMakeInstance()->RenameCommand(this->Args[0],
-                                           newName);
-      mf.AddCommand(f);
+      mf.GetState()->RenameCommand(this->Args[0], newName);
+      mf.GetState()->AddCommand(f);
 
       // remove the function blocker now that the macro is defined
       mf.RemoveFunctionBlocker(this, lff);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b1e67f4..be3bcdc 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -244,12 +244,6 @@ void cmMakefile::Print() const
 #endif
 }
 
-bool cmMakefile::CommandExists(const char* name) const
-{
-  return this->GetCMakeInstance()->CommandExists(name);
-}
-
-
 //----------------------------------------------------------------------------
 void cmMakefile::IssueMessage(cmake::MessageType t,
                               std::string const& text) const
@@ -340,7 +334,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
   static_cast<void>(stack_manager);
 
   // Lookup the command prototype.
-  if(cmCommand* proto = this->GetCMakeInstance()->GetCommand(name))
+  if(cmCommand* proto = this->GetState()->GetCommand(name))
     {
     // Clone the prototype.
     cmsys::auto_ptr<cmCommand> pcmd(proto->Clone());
@@ -718,11 +712,6 @@ void cmMakefile::EnforceDirectoryLevelRules() const
     }
 }
 
-void cmMakefile::AddCommand(cmCommand* wg)
-{
-  this->GetCMakeInstance()->AddCommand(wg);
-}
-
 // Set the make file
 void cmMakefile::SetLocalGenerator(cmLocalGenerator* lg)
 {
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 43c1b1a..299d550 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -746,14 +746,6 @@ public:
   bool ExecuteCommand(const cmListFileFunction& lff,
                       cmExecutionStatus &status);
 
-  /** Check if a command exists. */
-  bool CommandExists(const char* name) const;
-
-  /**
-   * Add a command to this cmake instance
-   */
-  void AddCommand(cmCommand* );
-
   ///! Enable support for named language, if nil then all languages are
   ///enabled.
   void EnableLanguage(std::vector<std::string>const& languages, bool optional);
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 89d5fea..a0f813e 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1758,7 +1758,7 @@ void cmake::AddDefaultCommands()
   for(std::vector<cmCommand*>::iterator i = commands.begin();
       i != commands.end(); ++i)
     {
-    this->AddCommand(*i);
+    this->State->AddCommand(*i);
     }
 }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=96f8c5f9a3bd60f553af054b43e06ce4864269e0
commit 96f8c5f9a3bd60f553af054b43e06ce4864269e0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Apr 11 12:30:26 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 21:12:14 2015 +0200

    cmState: Move cmCommand-related methods from cmake class.

diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index be6a766..17b6cf2 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -13,6 +13,10 @@
 
 #include "cmake.h"
 #include "cmCacheManager.h"
+#include "cmCommand.h"
+#include "cmAlgorithms.h"
+
+#include <assert.h>
 
 cmState::cmState(cmake* cm)
   : CMakeInstance(cm),
@@ -20,6 +24,11 @@ cmState::cmState(cmake* cm)
 {
 }
 
+cmState::~cmState()
+{
+  cmDeleteAll(this->Commands);
+}
+
 const char* cmCacheEntryTypes[] =
 { "BOOL",
   "PATH",
@@ -274,3 +283,104 @@ void cmState::SetIsInTryCompile(bool b)
 {
   this->IsInTryCompile = b;
 }
+
+void cmState::RenameCommand(std::string const& oldName,
+                            std::string const& newName)
+{
+  // if the command already exists, free the old one
+  std::string sOldName = cmSystemTools::LowerCase(oldName);
+  std::string sNewName = cmSystemTools::LowerCase(newName);
+  std::map<std::string, cmCommand*>::iterator pos =
+      this->Commands.find(sOldName);
+  if ( pos == this->Commands.end() )
+    {
+    return;
+    }
+  cmCommand* cmd = pos->second;
+
+  pos = this->Commands.find(sNewName);
+  if (pos != this->Commands.end())
+    {
+    delete pos->second;
+    this->Commands.erase(pos);
+    }
+  this->Commands.insert(std::make_pair(sNewName, cmd));
+  pos = this->Commands.find(sOldName);
+  this->Commands.erase(pos);
+}
+
+void cmState::AddCommand(cmCommand* command)
+{
+  std::string name = cmSystemTools::LowerCase(command->GetName());
+  // if the command already exists, free the old one
+  std::map<std::string, cmCommand*>::iterator pos = this->Commands.find(name);
+  if (pos != this->Commands.end())
+    {
+    delete pos->second;
+    this->Commands.erase(pos);
+    }
+  this->Commands.insert(std::make_pair(name, command));
+}
+
+void cmState::RemoveUnscriptableCommands()
+{
+  std::vector<std::string> unscriptableCommands;
+  for (std::map<std::string, cmCommand*>::iterator
+       pos = this->Commands.begin();
+       pos != this->Commands.end(); )
+    {
+    if (!pos->second->IsScriptable())
+      {
+      delete pos->second;
+      this->Commands.erase(pos++);
+      }
+    else
+      {
+      ++pos;
+      }
+    }
+}
+
+cmCommand* cmState::GetCommand(std::string const& name) const
+{
+  cmCommand* command = 0;
+  std::string sName = cmSystemTools::LowerCase(name);
+  std::map<std::string, cmCommand*>::const_iterator pos =
+      this->Commands.find(sName);
+  if (pos != this->Commands.end())
+    {
+    command = (*pos).second;
+    }
+  return command;
+}
+
+std::vector<std::string> cmState::GetCommandNames() const
+{
+  std::vector<std::string> commandNames;
+  commandNames.reserve(this->Commands.size());
+  std::map<std::string, cmCommand*>::const_iterator cmds
+      = this->Commands.begin();
+  for ( ; cmds != this->Commands.end(); ++ cmds )
+    {
+    commandNames.push_back(cmds->first);
+    }
+  return commandNames;
+}
+
+void cmState::RemoveUserDefinedCommands()
+{
+  for(std::map<std::string, cmCommand*>::iterator j = this->Commands.begin();
+      j != this->Commands.end(); )
+    {
+    if (j->second->IsA("cmMacroHelperCommand") ||
+        j->second->IsA("cmFunctionHelperCommand"))
+      {
+      delete j->second;
+      this->Commands.erase(j++);
+      }
+    else
+      {
+      ++j;
+      }
+    }
+}
diff --git a/Source/cmState.h b/Source/cmState.h
index 6df6182..a7a17ee 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -16,11 +16,13 @@
 #include "cmPropertyDefinitionMap.h"
 
 class cmake;
+class cmCommand;
 
 class cmState
 {
 public:
   cmState(cmake* cm);
+  ~cmState();
 
   enum CacheEntryType{ BOOL=0, PATH, FILEPATH, STRING, INTERNAL,STATIC,
                        UNINITIALIZED };
@@ -79,9 +81,17 @@ public:
   bool GetIsInTryCompile() const;
   void SetIsInTryCompile(bool b);
 
+  cmCommand* GetCommand(std::string const& name) const;
+  void AddCommand(cmCommand* command);
+  void RemoveUnscriptableCommands();
+  void RenameCommand(std::string const& oldName, std::string const& newName);
+  void RemoveUserDefinedCommands();
+  std::vector<std::string> GetCommandNames() const;
+
 private:
   std::map<cmProperty::ScopeType, cmPropertyDefinitionMap> PropertyDefinitions;
   std::vector<std::string> EnabledLanguages;
+  std::map<std::string, cmCommand*> Commands;
   cmake* CMakeInstance;
   bool IsInTryCompile;
 };
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 6518207..89d5fea 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -179,7 +179,6 @@ cmake::~cmake()
     delete this->GlobalGenerator;
     this->GlobalGenerator = 0;
     }
-  cmDeleteAll(this->Commands);
   cmDeleteAll(this->Generators);
 #ifdef CMAKE_BUILD_WITH_CMAKE
   delete this->VariableWatch;
@@ -197,94 +196,33 @@ void cmake::InitializeProperties()
 void cmake::CleanupCommandsAndMacros()
 {
   this->InitializeProperties();
-  for(RegisteredCommandsMap::iterator j = this->Commands.begin();
-      j != this->Commands.end(); )
-    {
-    if (j->second->IsA("cmMacroHelperCommand") ||
-        j->second->IsA("cmFunctionHelperCommand"))
-      {
-      delete j->second;
-      this->Commands.erase(j++);
-      }
-    else
-      {
-      ++j;
-      }
-    }
+  this->State->RemoveUserDefinedCommands();
 }
 
 bool cmake::CommandExists(const std::string& name) const
 {
-  return this->GetCommand(name) ? true : false;
+  return this->State->GetCommand(name) ? true : false;
 }
 
 cmCommand *cmake::GetCommand(const std::string& name) const
 {
-  cmCommand* command = 0;
-  std::string sName = cmSystemTools::LowerCase(name);
-  RegisteredCommandsMap::const_iterator pos = this->Commands.find(sName);
-  if (pos != this->Commands.end())
-    {
-    command = (*pos).second;
-    }
-  return command;
+  return this->State->GetCommand(name);
 }
 
 void cmake::RenameCommand(const std::string& oldName,
                           const std::string& newName)
 {
-  // if the command already exists, free the old one
-  std::string sOldName = cmSystemTools::LowerCase(oldName);
-  RegisteredCommandsMap::iterator pos = this->Commands.find(sOldName);
-  if ( pos == this->Commands.end() )
-    {
-    return;
-    }
-  std::string sNewName = cmSystemTools::LowerCase(newName);
-  cmCommand* cmd = pos->second;
-
-  pos = this->Commands.find(sNewName);
-  if (pos != this->Commands.end())
-    {
-    delete pos->second;
-    this->Commands.erase(pos);
-    }
-  this->Commands.insert(std::make_pair(sNewName, cmd));
-  pos = this->Commands.find(sOldName);
-  this->Commands.erase(pos);
+  this->State->RenameCommand(oldName, newName);
 }
 
 void cmake::AddCommand(cmCommand* command)
 {
-  std::string name = cmSystemTools::LowerCase(command->GetName());
-  // if the command already exists, free the old one
-  RegisteredCommandsMap::iterator pos = this->Commands.find(name);
-  if (pos != this->Commands.end())
-    {
-    delete pos->second;
-    this->Commands.erase(pos);
-    }
-  this->Commands.insert(std::make_pair(name, command));
+  this->State->AddCommand(command);
 }
 
-
 void cmake::RemoveUnscriptableCommands()
 {
-  std::vector<std::string> unscriptableCommands;
-  for (cmake::RegisteredCommandsMap::iterator
-       pos = this->Commands.begin();
-       pos != this->Commands.end(); )
-    {
-    if (!pos->second->IsScriptable())
-      {
-      delete pos->second;
-      this->Commands.erase(pos++);
-      }
-    else
-      {
-      ++pos;
-      }
-    }
+  this->State->RemoveUnscriptableCommands();
 }
 
 // Parse the args
@@ -2301,18 +2239,8 @@ const char *cmake::GetProperty(const std::string& prop,
     }
   else if ( prop == "COMMANDS" )
     {
-    cmake::RegisteredCommandsMap::iterator cmds
-        = this->Commands.begin();
-    for (unsigned int cc=0 ; cmds != this->Commands.end(); ++ cmds )
-      {
-      if ( cc > 0 )
-        {
-        output += ";";
-        }
-      output += cmds->first.c_str();
-      cc++;
-      }
-    this->SetProperty("COMMANDS",output.c_str());
+    std::vector<std::string> commands = this->State->GetCommandNames();
+    this->SetProperty("COMMANDS", cmJoin(commands, ";").c_str());
     }
   else if ( prop == "IN_TRY_COMPILE" )
     {
diff --git a/Source/cmake.h b/Source/cmake.h
index 455b54e..e7a8acb 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -93,7 +93,6 @@ class cmake
      */
     FIND_PACKAGE_MODE
   };
-  typedef std::map<std::string, cmCommand*> RegisteredCommandsMap;
   typedef std::map<std::string, cmInstalledFile> InstalledFilesMap;
 
   /// Default constructor
@@ -362,7 +361,6 @@ protected:
   typedef std::map<std::string,
                 CreateExtraGeneratorFunctionType> RegisteredExtraGeneratorsMap;
   typedef std::vector<cmGlobalGeneratorFactory*> RegisteredGeneratorsVector;
-  RegisteredCommandsMap Commands;
   RegisteredGeneratorsVector Generators;
   RegisteredExtraGeneratorsMap ExtraGenerators;
   void AddDefaultCommands();

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97e53ebb3cd728e6091f93cb7d4eac91ae417bdb
commit 97e53ebb3cd728e6091f93cb7d4eac91ae417bdb
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Apr 12 10:48:17 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 21:11:23 2015 +0200

    cmake: Simplify command clean up loop.

diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index b852e00..6518207 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -197,27 +197,20 @@ void cmake::InitializeProperties()
 void cmake::CleanupCommandsAndMacros()
 {
   this->InitializeProperties();
-  std::vector<cmCommand*> commands;
   for(RegisteredCommandsMap::iterator j = this->Commands.begin();
-      j != this->Commands.end(); ++j)
+      j != this->Commands.end(); )
     {
-    if ( !j->second->IsA("cmMacroHelperCommand") &&
-         !j->second->IsA("cmFunctionHelperCommand"))
+    if (j->second->IsA("cmMacroHelperCommand") ||
+        j->second->IsA("cmFunctionHelperCommand"))
       {
-      commands.push_back(j->second);
+      delete j->second;
+      this->Commands.erase(j++);
       }
     else
       {
-      delete j->second;
+      ++j;
       }
     }
-  this->Commands.clear();
-  std::vector<cmCommand*>::iterator it;
-  for ( it = commands.begin(); it != commands.end();
-    ++ it )
-    {
-    this->Commands[cmSystemTools::LowerCase((*it)->GetName())] = *it;
-    }
 }
 
 bool cmake::CommandExists(const std::string& name) const

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e738bcf9c7952bc9ae9bfb1be831c9f16998f54
commit 1e738bcf9c7952bc9ae9bfb1be831c9f16998f54
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Apr 13 20:48:48 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 21:10:19 2015 +0200

    cmake: Simplify RemoveUnscriptableCommands algorithm.
    
    Remove obsolete RemoveCommand method.

diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 0dcf9be..b852e00 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -261,17 +261,6 @@ void cmake::RenameCommand(const std::string& oldName,
   this->Commands.erase(pos);
 }
 
-void cmake::RemoveCommand(const std::string& name)
-{
-  std::string sName = cmSystemTools::LowerCase(name);
-  RegisteredCommandsMap::iterator pos = this->Commands.find(sName);
-  if ( pos != this->Commands.end() )
-    {
-    delete pos->second;
-    this->Commands.erase(pos);
-    }
-}
-
 void cmake::AddCommand(cmCommand* command)
 {
   std::string name = cmSystemTools::LowerCase(command->GetName());
@@ -289,22 +278,19 @@ void cmake::AddCommand(cmCommand* command)
 void cmake::RemoveUnscriptableCommands()
 {
   std::vector<std::string> unscriptableCommands;
-  for (cmake::RegisteredCommandsMap::const_iterator
+  for (cmake::RegisteredCommandsMap::iterator
        pos = this->Commands.begin();
-       pos != this->Commands.end();
-       ++pos)
+       pos != this->Commands.end(); )
     {
     if (!pos->second->IsScriptable())
       {
-      unscriptableCommands.push_back(pos->first);
+      delete pos->second;
+      this->Commands.erase(pos++);
+      }
+    else
+      {
+      ++pos;
       }
-    }
-
-  for(std::vector<std::string>::const_iterator it=unscriptableCommands.begin();
-      it != unscriptableCommands.end();
-      ++it)
-    {
-    this->RemoveCommand(*it);
     }
 }
 
diff --git a/Source/cmake.h b/Source/cmake.h
index 38c05c9..455b54e 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -222,7 +222,6 @@ class cmake
    */
   void AddCommand(cmCommand* );
   void RenameCommand(const std::string& oldName, const std::string& newName);
-  void RemoveCommand(const std::string& name);
   void RemoveUnscriptableCommands();
 
   /**

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62854e9966a3fe308cff4a76c89f6bf72f76551c
commit 62854e9966a3fe308cff4a76c89f6bf72f76551c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Apr 11 12:16:54 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 20:27:36 2015 +0200

    cmState: Move try_compile state from cmake class.

diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index c43262f..be6a766 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -15,7 +15,8 @@
 #include "cmCacheManager.h"
 
 cmState::cmState(cmake* cm)
-  : CMakeInstance(cm)
+  : CMakeInstance(cm),
+    IsInTryCompile(false)
 {
 }
 
@@ -263,3 +264,13 @@ void cmState::ClearEnabledLanguages()
 {
   this->EnabledLanguages.clear();
 }
+
+bool cmState::GetIsInTryCompile() const
+{
+  return this->IsInTryCompile;
+}
+
+void cmState::SetIsInTryCompile(bool b)
+{
+  this->IsInTryCompile = b;
+}
diff --git a/Source/cmState.h b/Source/cmState.h
index b1f1430..6df6182 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -76,10 +76,14 @@ public:
   std::vector<std::string> GetEnabledLanguages() const;
   void ClearEnabledLanguages();
 
+  bool GetIsInTryCompile() const;
+  void SetIsInTryCompile(bool b);
+
 private:
   std::map<cmProperty::ScopeType, cmPropertyDefinitionMap> PropertyDefinitions;
   std::vector<std::string> EnabledLanguages;
   cmake* CMakeInstance;
+  bool IsInTryCompile;
 };
 
 #endif
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 94b0ae0..0dcf9be 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -151,7 +151,6 @@ cmake::cmake()
 #endif
 
   this->Verbose = false;
-  this->InTryCompile = false;
   this->CacheManager = new cmCacheManager(this);
   this->GlobalGenerator = 0;
   this->ProgressCallback = 0;
@@ -1272,7 +1271,7 @@ int cmake::HandleDeleteCacheVariables(const std::string& var)
   cmSystemTools::ExpandListArgument(std::string(var), argsSplit, true);
   // erase the property to avoid infinite recursion
   this->SetProperty("__CMAKE_DELETE_CACHE_CHANGE_VARS_", "");
-  if(this->GetIsInTryCompile())
+  if(this->State->GetIsInTryCompile())
     {
     return 0;
     }
@@ -1555,7 +1554,7 @@ int cmake::ActualConfigure()
   // reset any system configuration information, except for when we are
   // InTryCompile. With TryCompile the system info is taken from the parent's
   // info to save time
-  if (!this->InTryCompile)
+  if (!this->State->GetIsInTryCompile())
     {
     this->GlobalGenerator->ClearEnabledLanguages();
 
@@ -1958,7 +1957,7 @@ void cmake::SetProgressCallback(ProgressCallbackType f, void *cd)
 
 void cmake::UpdateProgress(const char *msg, float prog)
 {
-  if(this->ProgressCallback && !this->InTryCompile)
+  if(this->ProgressCallback && !this->State->GetIsInTryCompile())
     {
     (*this->ProgressCallback)(msg, prog, this->ProgressCallbackClientData);
     return;
@@ -1967,12 +1966,12 @@ void cmake::UpdateProgress(const char *msg, float prog)
 
 bool cmake::GetIsInTryCompile() const
 {
-  return this->InTryCompile;
+  return this->State->GetIsInTryCompile();
 }
 
 void cmake::SetIsInTryCompile(bool b)
 {
-  this->InTryCompile = b;
+  this->State->SetIsInTryCompile(b);
 }
 
 void cmake::GetGeneratorDocumentation(std::vector<cmDocumentationEntry>& v)
@@ -2339,7 +2338,7 @@ const char *cmake::GetProperty(const std::string& prop,
   else if ( prop == "IN_TRY_COMPILE" )
     {
     this->SetProperty("IN_TRY_COMPILE",
-                      this->GetIsInTryCompile()? "1":"0");
+                      this->State->GetIsInTryCompile() ? "1" : "0");
     }
   else if ( prop == "ENABLED_LANGUAGES" )
     {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db8425be18439c899c08294dde117cc137c75d23
commit db8425be18439c899c08294dde117cc137c75d23
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Apr 11 14:16:44 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 20:27:36 2015 +0200

    cmake: Get enabled languages from cmState.
    
    The check for a global generator is redundant - the enabled
    languages are only populated by the global generator.

diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 6adecee..94b0ae0 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2343,14 +2343,9 @@ const char *cmake::GetProperty(const std::string& prop,
     }
   else if ( prop == "ENABLED_LANGUAGES" )
     {
-    std::string lang;
-    if(this->GlobalGenerator)
-      {
-      std::vector<std::string> enLangs;
-      this->GlobalGenerator->GetEnabledLanguages(enLangs);
-      lang = cmJoin(enLangs, ";");
-      }
-    this->SetProperty("ENABLED_LANGUAGES", lang.c_str());
+    std::string langs;
+    langs = cmJoin(this->State->GetEnabledLanguages(), ";");
+    this->SetProperty("ENABLED_LANGUAGES", langs.c_str());
     }
 #define STRING_LIST_ELEMENT(F) ";" #F
   if (prop == "CMAKE_C_KNOWN_FEATURES")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74de9a734c92288fb3e602be0d1c967b33b67443
commit 74de9a734c92288fb3e602be0d1c967b33b67443
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Apr 11 14:16:39 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 20:19:58 2015 +0200

    cmGlobalGenerator: Delegate storage of enabled languages to cmState.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 171d62a..56a0a45 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -969,13 +969,7 @@ void cmGlobalGenerator::SetLanguageEnabled(const std::string& l,
 void cmGlobalGenerator::SetLanguageEnabledFlag(const std::string& l,
                                                cmMakefile* mf)
 {
-  std::vector<std::string>::iterator it =
-      std::lower_bound(this->LanguageEnabled.begin(),
-                       this->LanguageEnabled.end(), l);
-  if (it == this->LanguageEnabled.end() || *it != l)
-    {
-    this->LanguageEnabled.insert(it, l);
-    }
+  this->CMakeInstance->GetState()->SetLanguageEnabled(l);
 
   // Fill the language-to-extension map with the current variable
   // settings to make sure it is available for the try_compile()
@@ -1086,13 +1080,12 @@ bool cmGlobalGenerator::IgnoreFile(const char* ext) const
 
 bool cmGlobalGenerator::GetLanguageEnabled(const std::string& l) const
 {
-  return std::binary_search(this->LanguageEnabled.begin(),
-                            this->LanguageEnabled.end(), l);
+  return this->CMakeInstance->GetState()->GetLanguageEnabled(l);
 }
 
 void cmGlobalGenerator::ClearEnabledLanguages()
 {
-  this->LanguageEnabled.clear();
+  return this->CMakeInstance->GetState()->ClearEnabledLanguages();
 }
 
 void cmGlobalGenerator::Configure()
@@ -1966,7 +1959,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
 void
 cmGlobalGenerator::GetEnabledLanguages(std::vector<std::string>& lang) const
 {
-  lang = this->LanguageEnabled;
+  lang = this->CMakeInstance->GetState()->GetEnabledLanguages();
 }
 
 int cmGlobalGenerator::GetLinkerPreference(const std::string& lang) const
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 3e88ecc..c43262f 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -236,3 +236,30 @@ bool cmState::IsPropertyChained(const std::string& name,
 {
   return this->PropertyDefinitions[scope].IsPropertyChained(name);
 }
+
+void cmState::SetLanguageEnabled(std::string const& l)
+{
+  std::vector<std::string>::iterator it =
+      std::lower_bound(this->EnabledLanguages.begin(),
+                       this->EnabledLanguages.end(), l);
+  if (it == this->EnabledLanguages.end() || *it != l)
+    {
+    this->EnabledLanguages.insert(it, l);
+    }
+}
+
+bool cmState::GetLanguageEnabled(std::string const& l) const
+{
+  return std::binary_search(this->EnabledLanguages.begin(),
+                            this->EnabledLanguages.end(), l);
+}
+
+std::vector<std::string> cmState::GetEnabledLanguages() const
+{
+  return this->EnabledLanguages;
+}
+
+void cmState::ClearEnabledLanguages()
+{
+  this->EnabledLanguages.clear();
+}
diff --git a/Source/cmState.h b/Source/cmState.h
index 310707d..b1f1430 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -71,10 +71,14 @@ public:
   bool IsPropertyDefined(const std::string& name, cmProperty::ScopeType scope);
   bool IsPropertyChained(const std::string& name, cmProperty::ScopeType scope);
 
+  void SetLanguageEnabled(std::string const& l);
+  bool GetLanguageEnabled(std::string const& l) const;
+  std::vector<std::string> GetEnabledLanguages() const;
+  void ClearEnabledLanguages();
 
 private:
   std::map<cmProperty::ScopeType, cmPropertyDefinitionMap> PropertyDefinitions;
-
+  std::vector<std::string> EnabledLanguages;
   cmake* CMakeInstance;
 };
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b159bff732d4e34a683edd1740604428049d1819
commit b159bff732d4e34a683edd1740604428049d1819
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Apr 4 23:33:26 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Apr 13 20:13:13 2015 +0200

    Move property definition to cmState.

diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 5ae7d4c..6134c6f 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -867,7 +867,7 @@ void CCONV DefineSourceFileProperty (void *arg, const char *name,
   int chained)
 {
   cmMakefile *mf = static_cast<cmMakefile *>(arg);
-  mf->GetCMakeInstance()->DefineProperty(name,cmProperty::SOURCE_FILE,
+  mf->GetState()->DefineProperty(name,cmProperty::SOURCE_FILE,
                                          briefDocs, longDocs,
                                          chained != 0);
 }
diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx
index 5ff0186..0efc7fc 100644
--- a/Source/cmDefinePropertyCommand.cxx
+++ b/Source/cmDefinePropertyCommand.cxx
@@ -11,6 +11,7 @@
 ============================================================================*/
 #include "cmDefinePropertyCommand.h"
 #include "cmake.h"
+#include "cmState.h"
 
 bool cmDefinePropertyCommand
 ::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
@@ -127,7 +128,7 @@ bool cmDefinePropertyCommand
     }
 
   // Actually define the property.
-  this->Makefile->GetCMakeInstance()->DefineProperty
+  this->Makefile->GetState()->DefineProperty
     (this->PropertyName, scope,
      this->BriefDocs.c_str(), this->FullDocs.c_str(), inherited);
 
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 80edbcd..a8481ad 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -143,7 +143,7 @@ bool cmGetPropertyCommand
     // Lookup brief documentation.
     std::string output;
     if(cmPropertyDefinition* def =
-       this->Makefile->GetCMakeInstance()->
+       this->Makefile->GetState()->
        GetPropertyDefinition(this->PropertyName, scope))
       {
       output = def->GetShortDescription();
@@ -159,7 +159,7 @@ bool cmGetPropertyCommand
     // Lookup full documentation.
     std::string output;
     if(cmPropertyDefinition* def =
-       this->Makefile->GetCMakeInstance()->
+       this->Makefile->GetState()->
        GetPropertyDefinition(this->PropertyName, scope))
       {
       output = def->GetFullDescription();
@@ -173,7 +173,7 @@ bool cmGetPropertyCommand
   else if(this->InfoType == OutDefined)
     {
     // Lookup if the property is defined
-    if(this->Makefile->GetCMakeInstance()->
+    if(this->Makefile->GetState()->
        GetPropertyDefinition(this->PropertyName, scope))
       {
       this->Makefile->AddDefinition(this->Variable, "1");
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ad3cce4..b1e67f4 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4476,21 +4476,6 @@ void cmMakefile::RaiseScope(const std::string& var, const char *varDef)
     }
 }
 
-
-// define properties
-void cmMakefile::DefineProperties(cmake *cm)
-{
-  cm->DefineProperty
-    ("RULE_LAUNCH_COMPILE", cmProperty::DIRECTORY,
-     "", "", true);
-  cm->DefineProperty
-    ("RULE_LAUNCH_LINK", cmProperty::DIRECTORY,
-     "", "", true);
-  cm->DefineProperty
-    ("RULE_LAUNCH_CUSTOM", cmProperty::DIRECTORY,
-     "", "", true);
-}
-
 //----------------------------------------------------------------------------
 cmTarget*
 cmMakefile::AddImportedTarget(const std::string& name,
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 57a4180..43c1b1a 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -851,9 +851,6 @@ public:
   const std::vector<cmTestGenerator*>& GetTestGenerators() const
     { return this->TestGenerators; }
 
-  // Define the properties
-  static void DefineProperties(cmake *cm);
-
   // push and pop variable scopes
   void PushScope();
   void PopScope();
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx
index e335b3b..070f6f1 100644
--- a/Source/cmPropertyMap.cxx
+++ b/Source/cmPropertyMap.cxx
@@ -12,6 +12,7 @@
 #include "cmPropertyMap.h"
 #include "cmSystemTools.h"
 #include "cmake.h"
+#include "cmState.h"
 
 cmProperty *cmPropertyMap::GetOrCreateProperty(const std::string& name)
 {
@@ -73,7 +74,8 @@ const char *cmPropertyMap
     // should we chain up?
     if (this->CMakeInstance)
       {
-      chain = this->CMakeInstance->IsPropertyChained(name,scope);
+      chain = this->CMakeInstance->GetState()->
+                    IsPropertyChained(name,scope);
       }
     return 0;
     }
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 7602f63..3e88ecc 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -178,3 +178,61 @@ void cmState::RemoveCacheEntryProperty(std::string const& key,
   this->CMakeInstance->GetCacheManager()
        ->GetCacheIterator(key.c_str()).SetProperty(propertyName, (void*)0);
 }
+
+void cmState::Initialize()
+{
+  this->PropertyDefinitions.clear();
+  this->DefineProperty
+    ("RULE_LAUNCH_COMPILE", cmProperty::DIRECTORY,
+     "", "", true);
+  this->DefineProperty
+    ("RULE_LAUNCH_LINK", cmProperty::DIRECTORY,
+     "", "", true);
+  this->DefineProperty
+    ("RULE_LAUNCH_CUSTOM", cmProperty::DIRECTORY,
+     "", "", true);
+
+  this->DefineProperty
+    ("RULE_LAUNCH_COMPILE", cmProperty::TARGET,
+     "", "", true);
+  this->DefineProperty
+    ("RULE_LAUNCH_LINK", cmProperty::TARGET,
+     "", "", true);
+  this->DefineProperty
+    ("RULE_LAUNCH_CUSTOM", cmProperty::TARGET,
+     "", "", true);
+}
+
+void cmState::DefineProperty(const std::string& name,
+                           cmProperty::ScopeType scope,
+                           const char *ShortDescription,
+                           const char *FullDescription,
+                           bool chained)
+{
+  this->PropertyDefinitions[scope].DefineProperty(name,scope,ShortDescription,
+                                                  FullDescription,
+                                                  chained);
+}
+
+cmPropertyDefinition *cmState
+::GetPropertyDefinition(const std::string& name,
+                        cmProperty::ScopeType scope)
+{
+  if (this->IsPropertyDefined(name,scope))
+    {
+    return &(this->PropertyDefinitions[scope][name]);
+    }
+  return 0;
+}
+
+bool cmState::IsPropertyDefined(const std::string& name,
+                              cmProperty::ScopeType scope)
+{
+  return this->PropertyDefinitions[scope].IsPropertyDefined(name);
+}
+
+bool cmState::IsPropertyChained(const std::string& name,
+                              cmProperty::ScopeType scope)
+{
+  return this->PropertyDefinitions[scope].IsPropertyChained(name);
+}
diff --git a/Source/cmState.h b/Source/cmState.h
index f2e8ef5..310707d 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -13,6 +13,7 @@
 #define cmState_h
 
 #include "cmStandardIncludes.h"
+#include "cmPropertyDefinitionMap.h"
 
 class cmake;
 
@@ -55,7 +56,25 @@ public:
   void RemoveCacheEntryProperty(std::string const& key,
                                 std::string const& propertyName);
 
+  void Initialize();
+  // Define a property
+  void DefineProperty(const std::string& name, cmProperty::ScopeType scope,
+                      const char *ShortDescription,
+                      const char *FullDescription,
+                      bool chain = false);
+
+  // get property definition
+  cmPropertyDefinition *GetPropertyDefinition
+  (const std::string& name, cmProperty::ScopeType scope);
+
+  // Is a property defined?
+  bool IsPropertyDefined(const std::string& name, cmProperty::ScopeType scope);
+  bool IsPropertyChained(const std::string& name, cmProperty::ScopeType scope);
+
+
 private:
+  std::map<cmProperty::ScopeType, cmPropertyDefinitionMap> PropertyDefinitions;
+
   cmake* CMakeInstance;
 };
 
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 6711e86..f1540d4 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -264,20 +264,6 @@ cmTarget::cmTarget()
   this->LinkImplementationLanguageIsContextDependent = true;
 }
 
-//----------------------------------------------------------------------------
-void cmTarget::DefineProperties(cmake *cm)
-{
-  cm->DefineProperty
-    ("RULE_LAUNCH_COMPILE", cmProperty::TARGET,
-     "", "", true);
-  cm->DefineProperty
-    ("RULE_LAUNCH_LINK", cmProperty::TARGET,
-     "", "", true);
-  cm->DefineProperty
-    ("RULE_LAUNCH_CUSTOM", cmProperty::TARGET,
-     "", "", true);
-}
-
 void cmTarget::SetType(TargetType type, const std::string& name)
 {
   this->Name = name;
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 55bf234..a032414 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -489,9 +489,6 @@ public:
                        const char** imp,
                        std::string& suffix) const;
 
-  // Define the properties
-  static void DefineProperties(cmake *cm);
-
   /** Get the macro to define when building sources in this target.
       If no macro should be defined null is returned.  */
   const char* GetExportMacro() const;
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 8cdf96f..6adecee 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -191,11 +191,8 @@ cmake::~cmake()
 void cmake::InitializeProperties()
 {
   this->Properties.clear();
-  this->PropertyDefinitions.clear();
 
-  // initialize properties
-  cmTarget::DefineProperties(this);
-  cmMakefile::DefineProperties(this);
+  this->State->Initialize();
 }
 
 void cmake::CleanupCommandsAndMacros()
@@ -2298,40 +2295,6 @@ void cmake::GenerateGraphViz(const char* fileName) const
 #endif
 }
 
-void cmake::DefineProperty(const std::string& name,
-                           cmProperty::ScopeType scope,
-                           const char *ShortDescription,
-                           const char *FullDescription,
-                           bool chained)
-{
-  this->PropertyDefinitions[scope].DefineProperty(name,scope,ShortDescription,
-                                                  FullDescription,
-                                                  chained);
-}
-
-cmPropertyDefinition *cmake
-::GetPropertyDefinition(const std::string& name,
-                        cmProperty::ScopeType scope)
-{
-  if (this->IsPropertyDefined(name,scope))
-    {
-    return &(this->PropertyDefinitions[scope][name]);
-    }
-  return 0;
-}
-
-bool cmake::IsPropertyDefined(const std::string& name,
-                              cmProperty::ScopeType scope)
-{
-  return this->PropertyDefinitions[scope].IsPropertyDefined(name);
-}
-
-bool cmake::IsPropertyChained(const std::string& name,
-                              cmProperty::ScopeType scope)
-{
-  return this->PropertyDefinitions[scope].IsPropertyChained(name);
-}
-
 void cmake::SetProperty(const std::string& prop, const char* value)
 {
   this->Properties.SetProperty(prop, value, cmProperty::GLOBAL);
diff --git a/Source/cmake.h b/Source/cmake.h
index e80cc1c..38c05c9 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -15,7 +15,6 @@
 
 #include "cmListFileCache.h"
 #include "cmSystemTools.h"
-#include "cmPropertyDefinitionMap.h"
 #include "cmPropertyMap.h"
 #include "cmInstalledFile.h"
 #include "cmCacheManager.h"
@@ -323,20 +322,6 @@ class cmake
 
   void MarkCliAsUsed(const std::string& variable);
 
-  // Define a property
-  void DefineProperty(const std::string& name, cmProperty::ScopeType scope,
-                      const char *ShortDescription,
-                      const char *FullDescription,
-                      bool chain = false);
-
-  // get property definition
-  cmPropertyDefinition *GetPropertyDefinition
-  (const std::string& name, cmProperty::ScopeType scope);
-
-  // Is a property defined?
-  bool IsPropertyDefined(const std::string& name, cmProperty::ScopeType scope);
-  bool IsPropertyChained(const std::string& name, cmProperty::ScopeType scope);
-
   /** Get the list of configurations (in upper case) considered to be
       debugging configurations.*/
   std::vector<std::string> GetDebugConfigs();
@@ -373,9 +358,6 @@ protected:
   int HandleDeleteCacheVariables(const std::string& var);
   cmPropertyMap Properties;
 
-  std::map<cmProperty::ScopeType, cmPropertyDefinitionMap>
-  PropertyDefinitions;
-
   typedef
      cmExternalMakefileProjectGenerator* (*CreateExtraGeneratorFunctionType)();
   typedef std::map<std::string,

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

Summary of changes:
 Source/CPack/cpack.cxx                 |    2 +-
 Source/CTest/cmCTestScriptHandler.cxx  |    4 +-
 Source/CTest/cmCTestSubmitHandler.cxx  |    3 +-
 Source/CTest/cmCTestTestHandler.cxx    |    8 +-
 Source/cmAddLibraryCommand.cxx         |    3 +-
 Source/cmCPluginAPI.cxx                |    4 +-
 Source/cmCTest.cxx                     |    9 +-
 Source/cmComputeLinkInformation.cxx    |   21 +--
 Source/cmComputeTargetDepends.cxx      |    7 +-
 Source/cmConditionEvaluator.cxx        |    2 +-
 Source/cmDefinePropertyCommand.cxx     |    3 +-
 Source/cmExtraEclipseCDT4Generator.cxx |    4 +-
 Source/cmFindLibraryCommand.cxx        |    8 +-
 Source/cmFindPackageCommand.cxx        |   35 +++--
 Source/cmFunctionCommand.cxx           |    5 +-
 Source/cmGetCMakePropertyCommand.cxx   |    4 +-
 Source/cmGetPropertyCommand.cxx        |    9 +-
 Source/cmGlobalGenerator.cxx           |   30 ++--
 Source/cmLoadCommandCommand.cxx        |    2 +-
 Source/cmLocalNinjaGenerator.cxx       |    5 +-
 Source/cmMacroCommand.cxx              |    5 +-
 Source/cmMakefile.cxx                  |   33 +---
 Source/cmMakefile.h                    |   11 --
 Source/cmMakefileTargetGenerator.cxx   |    4 +-
 Source/cmPropertyMap.cxx               |    4 +-
 Source/cmQtAutoGenerators.cxx          |    9 +-
 Source/cmState.cxx                     |  268 +++++++++++++++++++++++++++++++-
 Source/cmState.h                       |   45 ++++++
 Source/cmTarget.cxx                    |   14 --
 Source/cmTarget.h                      |    3 -
 Source/cmake.cxx                       |  247 +++--------------------------
 Source/cmake.h                         |   41 -----
 32 files changed, 437 insertions(+), 415 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list