浏览代码

cmState: Move CacheEntryType enum to separate namespace

Port dependent code to the change.
Stephen Kelly 9 年之前
父节点
当前提交
2fe3e55d53
共有 50 个文件被更改,包括 211 次插入191 次删除
  1. 1 1
      Source/CursesDialog/cmCursesBoolWidget.cxx
  2. 5 5
      Source/CursesDialog/cmCursesCacheEntryComposite.cxx
  3. 1 1
      Source/CursesDialog/cmCursesDummyWidget.cxx
  4. 1 1
      Source/CursesDialog/cmCursesFilePathWidget.cxx
  5. 16 15
      Source/CursesDialog/cmCursesMainForm.cxx
  6. 1 1
      Source/CursesDialog/cmCursesMainForm.h
  7. 1 1
      Source/CursesDialog/cmCursesOptionsWidget.cxx
  8. 2 2
      Source/CursesDialog/cmCursesPathWidget.cxx
  9. 1 1
      Source/CursesDialog/cmCursesStringWidget.cxx
  10. 2 2
      Source/CursesDialog/cmCursesWidget.h
  11. 13 13
      Source/QtDialog/QCMake.cxx
  12. 1 1
      Source/cmBuildCommand.cxx
  13. 2 2
      Source/cmBuildNameCommand.cxx
  14. 1 1
      Source/cmCMakePolicyCommand.cxx
  15. 6 6
      Source/cmCPluginAPI.cxx
  16. 1 1
      Source/cmCTest.cxx
  17. 17 17
      Source/cmCacheManager.cxx
  18. 13 6
      Source/cmCacheManager.h
  19. 1 1
      Source/cmCoreTryCompile.cxx
  20. 3 2
      Source/cmExtraEclipseCDT4Generator.cxx
  21. 1 1
      Source/cmFindBase.cxx
  22. 3 3
      Source/cmFindLibraryCommand.cxx
  23. 1 1
      Source/cmFindPackageCommand.cxx
  24. 4 3
      Source/cmFindPathCommand.cxx
  25. 3 3
      Source/cmFindProgramCommand.cxx
  26. 6 6
      Source/cmGetFilenameComponentCommand.cxx
  27. 4 4
      Source/cmGlobalGenerator.cxx
  28. 1 1
      Source/cmGlobalUnixMakefileGenerator3.cxx
  29. 2 2
      Source/cmGlobalVisualStudio7Generator.cxx
  30. 4 3
      Source/cmGlobalXCodeGenerator.cxx
  31. 1 1
      Source/cmIncludeExternalMSProjectCommand.cxx
  32. 1 1
      Source/cmLoadCacheCommand.cxx
  33. 1 1
      Source/cmLocalVisualStudio10Generator.cxx
  34. 1 1
      Source/cmLocalVisualStudio7Generator.cxx
  35. 8 7
      Source/cmMakefile.cxx
  36. 1 1
      Source/cmMakefile.h
  37. 1 1
      Source/cmMarkAsAdvancedCommand.cxx
  38. 2 2
      Source/cmOptionCommand.cxx
  39. 1 1
      Source/cmPolicies.cxx
  40. 3 3
      Source/cmProjectCommand.cxx
  41. 5 4
      Source/cmSetCommand.cxx
  42. 2 1
      Source/cmSiteNameCommand.cxx
  43. 8 7
      Source/cmState.cxx
  44. 17 15
      Source/cmState.h
  45. 2 2
      Source/cmTarget.cxx
  46. 6 5
      Source/cmTryRunCommand.cxx
  47. 2 2
      Source/cmUtilitySourceCommand.cxx
  48. 27 25
      Source/cmake.cxx
  49. 1 1
      Source/cmake.h
  50. 3 3
      Source/cmakemain.cxx

+ 1 - 1
Source/CursesDialog/cmCursesBoolWidget.cxx

@@ -11,7 +11,7 @@ cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left,
                                        int top)
                                        int top)
   : cmCursesWidget(width, height, left, top)
   : cmCursesWidget(width, height, left, top)
 {
 {
-  this->Type = cmState::BOOL;
+  this->Type = cmStateEnums::BOOL;
   set_field_fore(this->Field, A_NORMAL);
   set_field_fore(this->Field, A_NORMAL);
   set_field_back(this->Field, A_STANDOUT);
   set_field_back(this->Field, A_STANDOUT);
   field_opts_off(this->Field, O_STATIC);
   field_opts_off(this->Field, O_STATIC);

+ 5 - 5
Source/CursesDialog/cmCursesCacheEntryComposite.cxx

@@ -47,7 +47,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
   const char* value = cm->GetState()->GetCacheEntryValue(key);
   const char* value = cm->GetState()->GetCacheEntryValue(key);
   assert(value);
   assert(value);
   switch (cm->GetState()->GetCacheEntryType(key)) {
   switch (cm->GetState()->GetCacheEntryType(key)) {
-    case cmState::BOOL:
+    case cmStateEnums::BOOL:
       this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1);
       this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1);
       if (cmSystemTools::IsOn(value)) {
       if (cmSystemTools::IsOn(value)) {
         static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(true);
         static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(true);
@@ -55,15 +55,15 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
         static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(false);
         static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(false);
       }
       }
       break;
       break;
-    case cmState::PATH:
+    case cmStateEnums::PATH:
       this->Entry = new cmCursesPathWidget(this->EntryWidth, 1, 1, 1);
       this->Entry = new cmCursesPathWidget(this->EntryWidth, 1, 1, 1);
       static_cast<cmCursesPathWidget*>(this->Entry)->SetString(value);
       static_cast<cmCursesPathWidget*>(this->Entry)->SetString(value);
       break;
       break;
-    case cmState::FILEPATH:
+    case cmStateEnums::FILEPATH:
       this->Entry = new cmCursesFilePathWidget(this->EntryWidth, 1, 1, 1);
       this->Entry = new cmCursesFilePathWidget(this->EntryWidth, 1, 1, 1);
       static_cast<cmCursesFilePathWidget*>(this->Entry)->SetString(value);
       static_cast<cmCursesFilePathWidget*>(this->Entry)->SetString(value);
       break;
       break;
-    case cmState::STRING: {
+    case cmStateEnums::STRING: {
       const char* stringsProp =
       const char* stringsProp =
         cm->GetState()->GetCacheEntryProperty(key, "STRINGS");
         cm->GetState()->GetCacheEntryProperty(key, "STRINGS");
       if (stringsProp) {
       if (stringsProp) {
@@ -83,7 +83,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
       }
       }
       break;
       break;
     }
     }
-    case cmState::UNINITIALIZED:
+    case cmStateEnums::UNINITIALIZED:
       cmSystemTools::Error("Found an undefined variable: ", key.c_str());
       cmSystemTools::Error("Found an undefined variable: ", key.c_str());
       break;
       break;
     default:
     default:

+ 1 - 1
Source/CursesDialog/cmCursesDummyWidget.cxx

@@ -9,7 +9,7 @@ cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left,
                                          int top)
                                          int top)
   : cmCursesWidget(width, height, left, top)
   : cmCursesWidget(width, height, left, top)
 {
 {
-  this->Type = cmState::INTERNAL;
+  this->Type = cmStateEnums::INTERNAL;
 }
 }
 
 
 bool cmCursesDummyWidget::HandleInput(int& /*key*/, cmCursesMainForm* /*fm*/,
 bool cmCursesDummyWidget::HandleInput(int& /*key*/, cmCursesMainForm* /*fm*/,

+ 1 - 1
Source/CursesDialog/cmCursesFilePathWidget.cxx

@@ -9,5 +9,5 @@ cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left,
                                                int top)
                                                int top)
   : cmCursesPathWidget(width, height, left, top)
   : cmCursesPathWidget(width, height, left, top)
 {
 {
-  this->Type = cmState::FILEPATH;
+  this->Type = cmStateEnums::FILEPATH;
 }
 }

+ 16 - 15
Source/CursesDialog/cmCursesMainForm.cxx

@@ -106,10 +106,10 @@ void cmCursesMainForm::InitializeUI()
 
 
   for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
   for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
        it != cacheKeys.end(); ++it) {
        it != cacheKeys.end(); ++it) {
-    cmState::CacheEntryType t =
+    cmStateEnums::CacheEntryType t =
       this->CMakeInstance->GetState()->GetCacheEntryType(*it);
       this->CMakeInstance->GetState()->GetCacheEntryType(*it);
-    if (t != cmState::INTERNAL && t != cmState::STATIC &&
-        t != cmState::UNINITIALIZED) {
+    if (t != cmStateEnums::INTERNAL && t != cmStateEnums::STATIC &&
+        t != cmStateEnums::UNINITIALIZED) {
       ++count;
       ++count;
     }
     }
   }
   }
@@ -130,10 +130,10 @@ void cmCursesMainForm::InitializeUI()
     for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
     for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
          it != cacheKeys.end(); ++it) {
          it != cacheKeys.end(); ++it) {
       std::string key = *it;
       std::string key = *it;
-      cmState::CacheEntryType t =
+      cmStateEnums::CacheEntryType t =
         this->CMakeInstance->GetState()->GetCacheEntryType(*it);
         this->CMakeInstance->GetState()->GetCacheEntryType(*it);
-      if (t == cmState::INTERNAL || t == cmState::STATIC ||
-          t == cmState::UNINITIALIZED) {
+      if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC ||
+          t == cmStateEnums::UNINITIALIZED) {
         continue;
         continue;
       }
       }
 
 
@@ -148,10 +148,10 @@ void cmCursesMainForm::InitializeUI()
     for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
     for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
          it != cacheKeys.end(); ++it) {
          it != cacheKeys.end(); ++it) {
       std::string key = *it;
       std::string key = *it;
-      cmState::CacheEntryType t =
+      cmStateEnums::CacheEntryType t =
         this->CMakeInstance->GetState()->GetCacheEntryType(*it);
         this->CMakeInstance->GetState()->GetCacheEntryType(*it);
-      if (t == cmState::INTERNAL || t == cmState::STATIC ||
-          t == cmState::UNINITIALIZED) {
+      if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC ||
+          t == cmStateEnums::UNINITIALIZED) {
         continue;
         continue;
       }
       }
 
 
@@ -249,8 +249,9 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
     cmCursesWidget* cw =
     cmCursesWidget* cw =
       reinterpret_cast<cmCursesWidget*>(field_userptr(currentField));
       reinterpret_cast<cmCursesWidget*>(field_userptr(currentField));
     // If in edit mode, get out of it
     // If in edit mode, get out of it
-    if (cw->GetType() == cmState::STRING || cw->GetType() == cmState::PATH ||
-        cw->GetType() == cmState::FILEPATH) {
+    if (cw->GetType() == cmStateEnums::STRING ||
+        cw->GetType() == cmStateEnums::PATH ||
+        cw->GetType() == cmStateEnums::FILEPATH) {
       cmCursesStringWidget* sw = static_cast<cmCursesStringWidget*>(cw);
       cmCursesStringWidget* sw = static_cast<cmCursesStringWidget*>(cw);
       sw->SetInEdit(false);
       sw->SetInEdit(false);
     }
     }
@@ -704,7 +705,7 @@ void cmCursesMainForm::FillCacheManagerFromUI()
       std::string newValue = (*this->Entries)[i]->Entry->GetValue();
       std::string newValue = (*this->Entries)[i]->Entry->GetValue();
       std::string fixedOldValue;
       std::string fixedOldValue;
       std::string fixedNewValue;
       std::string fixedNewValue;
-      cmState::CacheEntryType t =
+      cmStateEnums::CacheEntryType t =
         this->CMakeInstance->GetState()->GetCacheEntryType(cacheKey);
         this->CMakeInstance->GetState()->GetCacheEntryType(cacheKey);
       this->FixValue(t, oldValue, fixedOldValue);
       this->FixValue(t, oldValue, fixedOldValue);
       this->FixValue(t, newValue, fixedNewValue);
       this->FixValue(t, newValue, fixedNewValue);
@@ -720,14 +721,14 @@ void cmCursesMainForm::FillCacheManagerFromUI()
   }
   }
 }
 }
 
 
-void cmCursesMainForm::FixValue(cmState::CacheEntryType type,
+void cmCursesMainForm::FixValue(cmStateEnums::CacheEntryType type,
                                 const std::string& in, std::string& out) const
                                 const std::string& in, std::string& out) const
 {
 {
   out = in.substr(0, in.find_last_not_of(' ') + 1);
   out = in.substr(0, in.find_last_not_of(' ') + 1);
-  if (type == cmState::PATH || type == cmState::FILEPATH) {
+  if (type == cmStateEnums::PATH || type == cmStateEnums::FILEPATH) {
     cmSystemTools::ConvertToUnixSlashes(out);
     cmSystemTools::ConvertToUnixSlashes(out);
   }
   }
-  if (type == cmState::BOOL) {
+  if (type == cmStateEnums::BOOL) {
     if (cmSystemTools::IsOff(out.c_str())) {
     if (cmSystemTools::IsOff(out.c_str())) {
       out = "OFF";
       out = "OFF";
     } else {
     } else {

+ 1 - 1
Source/CursesDialog/cmCursesMainForm.h

@@ -110,7 +110,7 @@ protected:
   // cache.
   // cache.
   void FillCacheManagerFromUI();
   void FillCacheManagerFromUI();
   // Fix formatting of values to a consistent form.
   // Fix formatting of values to a consistent form.
-  void FixValue(cmState::CacheEntryType type, const std::string& in,
+  void FixValue(cmStateEnums::CacheEntryType type, const std::string& in,
                 std::string& out) const;
                 std::string& out) const;
   // Re-post the existing fields. Used to toggle between
   // Re-post the existing fields. Used to toggle between
   // normal and advanced modes. Render() should be called
   // normal and advanced modes. Render() should be called

+ 1 - 1
Source/CursesDialog/cmCursesOptionsWidget.cxx

@@ -11,7 +11,7 @@ cmCursesOptionsWidget::cmCursesOptionsWidget(int width, int height, int left,
                                              int top)
                                              int top)
   : cmCursesWidget(width, height, left, top)
   : cmCursesWidget(width, height, left, top)
 {
 {
-  this->Type = cmState::BOOL; // this is a bit of a hack
+  this->Type = cmStateEnums::BOOL; // this is a bit of a hack
   // there is no option type, and string type causes ccmake to cast
   // there is no option type, and string type causes ccmake to cast
   // the widget into a string widget at some point.  BOOL is safe for
   // the widget into a string widget at some point.  BOOL is safe for
   // now.
   // now.

+ 2 - 2
Source/CursesDialog/cmCursesPathWidget.cxx

@@ -13,7 +13,7 @@ cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left,
                                        int top)
                                        int top)
   : cmCursesStringWidget(width, height, left, top)
   : cmCursesStringWidget(width, height, left, top)
 {
 {
-  this->Type = cmState::PATH;
+  this->Type = cmStateEnums::PATH;
   this->Cycle = false;
   this->Cycle = false;
   this->CurrentIndex = 0;
   this->CurrentIndex = 0;
 }
 }
@@ -50,7 +50,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
   std::vector<std::string> dirs;
   std::vector<std::string> dirs;
 
 
   cmSystemTools::SimpleGlob(glob, dirs,
   cmSystemTools::SimpleGlob(glob, dirs,
-                            (this->Type == cmState::PATH ? -1 : 0));
+                            (this->Type == cmStateEnums::PATH ? -1 : 0));
   if (this->CurrentIndex < dirs.size()) {
   if (this->CurrentIndex < dirs.size()) {
     cstr = dirs[this->CurrentIndex];
     cstr = dirs[this->CurrentIndex];
   }
   }

+ 1 - 1
Source/CursesDialog/cmCursesStringWidget.cxx

@@ -21,7 +21,7 @@ cmCursesStringWidget::cmCursesStringWidget(int width, int height, int left,
   : cmCursesWidget(width, height, left, top)
   : cmCursesWidget(width, height, left, top)
 {
 {
   this->InEdit = false;
   this->InEdit = false;
-  this->Type = cmState::STRING;
+  this->Type = cmStateEnums::STRING;
   set_field_fore(this->Field, A_NORMAL);
   set_field_fore(this->Field, A_NORMAL);
   set_field_back(this->Field, A_STANDOUT);
   set_field_back(this->Field, A_STANDOUT);
   field_opts_off(this->Field, O_STATIC);
   field_opts_off(this->Field, O_STATIC);

+ 2 - 2
Source/CursesDialog/cmCursesWidget.h

@@ -41,7 +41,7 @@ public:
   /**
   /**
    * Get the type of the widget (STRING, PATH etc...)
    * Get the type of the widget (STRING, PATH etc...)
    */
    */
-  cmState::CacheEntryType GetType() { return this->Type; }
+  cmStateEnums::CacheEntryType GetType() { return this->Type; }
 
 
   /**
   /**
    * If there are any, print the widget specific commands
    * If there are any, print the widget specific commands
@@ -62,7 +62,7 @@ protected:
   cmCursesWidget(const cmCursesWidget& from);
   cmCursesWidget(const cmCursesWidget& from);
   void operator=(const cmCursesWidget&);
   void operator=(const cmCursesWidget&);
 
 
-  cmState::CacheEntryType Type;
+  cmStateEnums::CacheEntryType Type;
   std::string Value;
   std::string Value;
   FIELD* Field;
   FIELD* Field;
   // The page in the main form this widget is in
   // The page in the main form this widget is in

+ 13 - 13
Source/QtDialog/QCMake.cxx

@@ -196,8 +196,8 @@ void QCMake::setProperties(const QCMakePropertyList& newProps)
   std::vector<std::string> cacheKeys = state->GetCacheEntryKeys();
   std::vector<std::string> cacheKeys = state->GetCacheEntryKeys();
   for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
   for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
        it != cacheKeys.end(); ++it) {
        it != cacheKeys.end(); ++it) {
-    cmState::CacheEntryType t = state->GetCacheEntryType(*it);
-    if (t == cmState::INTERNAL || t == cmState::STATIC) {
+    cmStateEnums::CacheEntryType t = state->GetCacheEntryType(*it);
+    if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC) {
       continue;
       continue;
     }
     }
 
 
@@ -232,19 +232,19 @@ void QCMake::setProperties(const QCMakePropertyList& newProps)
     if (s.Type == QCMakeProperty::BOOL) {
     if (s.Type == QCMakeProperty::BOOL) {
       this->CMakeInstance->AddCacheEntry(
       this->CMakeInstance->AddCacheEntry(
         s.Key.toLocal8Bit().data(), s.Value.toBool() ? "ON" : "OFF",
         s.Key.toLocal8Bit().data(), s.Value.toBool() ? "ON" : "OFF",
-        s.Help.toLocal8Bit().data(), cmState::BOOL);
+        s.Help.toLocal8Bit().data(), cmStateEnums::BOOL);
     } else if (s.Type == QCMakeProperty::STRING) {
     } else if (s.Type == QCMakeProperty::STRING) {
       this->CMakeInstance->AddCacheEntry(
       this->CMakeInstance->AddCacheEntry(
         s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
         s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
-        s.Help.toLocal8Bit().data(), cmState::STRING);
+        s.Help.toLocal8Bit().data(), cmStateEnums::STRING);
     } else if (s.Type == QCMakeProperty::PATH) {
     } else if (s.Type == QCMakeProperty::PATH) {
       this->CMakeInstance->AddCacheEntry(
       this->CMakeInstance->AddCacheEntry(
         s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
         s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
-        s.Help.toLocal8Bit().data(), cmState::PATH);
+        s.Help.toLocal8Bit().data(), cmStateEnums::PATH);
     } else if (s.Type == QCMakeProperty::FILEPATH) {
     } else if (s.Type == QCMakeProperty::FILEPATH) {
       this->CMakeInstance->AddCacheEntry(
       this->CMakeInstance->AddCacheEntry(
         s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
         s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
-        s.Help.toLocal8Bit().data(), cmState::FILEPATH);
+        s.Help.toLocal8Bit().data(), cmStateEnums::FILEPATH);
     }
     }
   }
   }
 
 
@@ -259,9 +259,9 @@ QCMakePropertyList QCMake::properties() const
   std::vector<std::string> cacheKeys = state->GetCacheEntryKeys();
   std::vector<std::string> cacheKeys = state->GetCacheEntryKeys();
   for (std::vector<std::string>::const_iterator i = cacheKeys.begin();
   for (std::vector<std::string>::const_iterator i = cacheKeys.begin();
        i != cacheKeys.end(); ++i) {
        i != cacheKeys.end(); ++i) {
-    cmState::CacheEntryType t = state->GetCacheEntryType(*i);
-    if (t == cmState::INTERNAL || t == cmState::STATIC ||
-        t == cmState::UNINITIALIZED) {
+    cmStateEnums::CacheEntryType t = state->GetCacheEntryType(*i);
+    if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC ||
+        t == cmStateEnums::UNINITIALIZED) {
       continue;
       continue;
     }
     }
 
 
@@ -273,14 +273,14 @@ QCMakePropertyList QCMake::properties() const
       QString::fromLocal8Bit(state->GetCacheEntryProperty(*i, "HELPSTRING"));
       QString::fromLocal8Bit(state->GetCacheEntryProperty(*i, "HELPSTRING"));
     prop.Value = QString::fromLocal8Bit(cachedValue);
     prop.Value = QString::fromLocal8Bit(cachedValue);
     prop.Advanced = state->GetCacheEntryPropertyAsBool(*i, "ADVANCED");
     prop.Advanced = state->GetCacheEntryPropertyAsBool(*i, "ADVANCED");
-    if (t == cmState::BOOL) {
+    if (t == cmStateEnums::BOOL) {
       prop.Type = QCMakeProperty::BOOL;
       prop.Type = QCMakeProperty::BOOL;
       prop.Value = cmSystemTools::IsOn(cachedValue);
       prop.Value = cmSystemTools::IsOn(cachedValue);
-    } else if (t == cmState::PATH) {
+    } else if (t == cmStateEnums::PATH) {
       prop.Type = QCMakeProperty::PATH;
       prop.Type = QCMakeProperty::PATH;
-    } else if (t == cmState::FILEPATH) {
+    } else if (t == cmStateEnums::FILEPATH) {
       prop.Type = QCMakeProperty::FILEPATH;
       prop.Type = QCMakeProperty::FILEPATH;
-    } else if (t == cmState::STRING) {
+    } else if (t == cmStateEnums::STRING) {
       prop.Type = QCMakeProperty::STRING;
       prop.Type = QCMakeProperty::STRING;
       const char* stringsProperty =
       const char* stringsProperty =
         state->GetCacheEntryProperty(*i, "STRINGS");
         state->GetCacheEntryProperty(*i, "STRINGS");

+ 1 - 1
Source/cmBuildCommand.cxx

@@ -116,6 +116,6 @@ bool cmBuildCommand::TwoArgsSignature(std::vector<std::string> const& args)
   this->Makefile->AddCacheDefinition(define, makecommand.c_str(),
   this->Makefile->AddCacheDefinition(define, makecommand.c_str(),
                                      "Command used to build entire project "
                                      "Command used to build entire project "
                                      "from the command line.",
                                      "from the command line.",
-                                     cmState::STRING);
+                                     cmStateEnums::STRING);
   return true;
   return true;
 }
 }

+ 2 - 2
Source/cmBuildNameCommand.cxx

@@ -27,7 +27,7 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args,
       std::replace(cv.begin(), cv.end(), '(', '_');
       std::replace(cv.begin(), cv.end(), '(', '_');
       std::replace(cv.begin(), cv.end(), ')', '_');
       std::replace(cv.begin(), cv.end(), ')', '_');
       this->Makefile->AddCacheDefinition(args[0], cv.c_str(), "Name of build.",
       this->Makefile->AddCacheDefinition(args[0], cv.c_str(), "Name of build.",
-                                         cmState::STRING);
+                                         cmStateEnums::STRING);
     }
     }
     return true;
     return true;
   }
   }
@@ -53,6 +53,6 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args,
   std::replace(buildname.begin(), buildname.end(), ')', '_');
   std::replace(buildname.begin(), buildname.end(), ')', '_');
 
 
   this->Makefile->AddCacheDefinition(args[0], buildname.c_str(),
   this->Makefile->AddCacheDefinition(args[0], buildname.c_str(),
-                                     "Name of build.", cmState::STRING);
+                                     "Name of build.", cmStateEnums::STRING);
   return true;
   return true;
 }
 }

+ 1 - 1
Source/cmCMakePolicyCommand.cxx

@@ -79,7 +79,7 @@ bool cmCMakePolicyCommand::HandleSetMode(std::vector<std::string> const& args)
         "For backwards compatibility, what version of CMake "
         "For backwards compatibility, what version of CMake "
         "commands and "
         "commands and "
         "syntax should this version of CMake try to support.",
         "syntax should this version of CMake try to support.",
-        cmState::STRING);
+        cmStateEnums::STRING);
     }
     }
   }
   }
   return true;
   return true;

+ 6 - 6
Source/cmCPluginAPI.cxx

@@ -75,22 +75,22 @@ void CCONV cmAddCacheDefinition(void* arg, const char* name, const char* value,
 
 
   switch (type) {
   switch (type) {
     case CM_CACHE_BOOL:
     case CM_CACHE_BOOL:
-      mf->AddCacheDefinition(name, value, doc, cmState::BOOL);
+      mf->AddCacheDefinition(name, value, doc, cmStateEnums::BOOL);
       break;
       break;
     case CM_CACHE_PATH:
     case CM_CACHE_PATH:
-      mf->AddCacheDefinition(name, value, doc, cmState::PATH);
+      mf->AddCacheDefinition(name, value, doc, cmStateEnums::PATH);
       break;
       break;
     case CM_CACHE_FILEPATH:
     case CM_CACHE_FILEPATH:
-      mf->AddCacheDefinition(name, value, doc, cmState::FILEPATH);
+      mf->AddCacheDefinition(name, value, doc, cmStateEnums::FILEPATH);
       break;
       break;
     case CM_CACHE_STRING:
     case CM_CACHE_STRING:
-      mf->AddCacheDefinition(name, value, doc, cmState::STRING);
+      mf->AddCacheDefinition(name, value, doc, cmStateEnums::STRING);
       break;
       break;
     case CM_CACHE_INTERNAL:
     case CM_CACHE_INTERNAL:
-      mf->AddCacheDefinition(name, value, doc, cmState::INTERNAL);
+      mf->AddCacheDefinition(name, value, doc, cmStateEnums::INTERNAL);
       break;
       break;
     case CM_CACHE_STATIC:
     case CM_CACHE_STATIC:
-      mf->AddCacheDefinition(name, value, doc, cmState::STATIC);
+      mf->AddCacheDefinition(name, value, doc, cmStateEnums::STATIC);
       break;
       break;
   }
   }
 }
 }

+ 1 - 1
Source/cmCTest.cxx

@@ -1969,7 +1969,7 @@ bool cmCTest::AddVariableDefinition(const std::string& arg)
 {
 {
   std::string name;
   std::string name;
   std::string value;
   std::string value;
-  cmState::CacheEntryType type = cmState::UNINITIALIZED;
+  cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED;
 
 
   if (cmake::ParseCacheEntry(arg, name, value, type)) {
   if (cmake::ParseCacheEntry(arg, name, value, type)) {
     this->Definitions[name] = value;
     this->Definitions[name] = value;

+ 17 - 17
Source/cmCacheManager.cxx

@@ -94,13 +94,13 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal,
         // If the entry is not internal to the cache being loaded
         // If the entry is not internal to the cache being loaded
         // or if it is in the list of internal entries to be
         // or if it is in the list of internal entries to be
         // imported, load it.
         // imported, load it.
-        if (internal || (e.Type != cmState::INTERNAL) ||
+        if (internal || (e.Type != cmStateEnums::INTERNAL) ||
             (includes.find(entryKey) != includes.end())) {
             (includes.find(entryKey) != includes.end())) {
           // If we are loading the cache from another project,
           // If we are loading the cache from another project,
           // make all loaded entries internal so that it is
           // make all loaded entries internal so that it is
           // not visible in the gui
           // not visible in the gui
           if (!internal) {
           if (!internal) {
-            e.Type = cmState::INTERNAL;
+            e.Type = cmStateEnums::INTERNAL;
             helpString = "DO NOT EDIT, ";
             helpString = "DO NOT EDIT, ";
             helpString += entryKey;
             helpString += entryKey;
             helpString += " loaded from external file.  "
             helpString += " loaded from external file.  "
@@ -142,11 +142,11 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal,
     this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", "0",
     this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", "0",
                         "Minor version of cmake used to create the "
                         "Minor version of cmake used to create the "
                         "current loaded cache",
                         "current loaded cache",
-                        cmState::INTERNAL);
+                        cmStateEnums::INTERNAL);
     this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", "0",
     this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", "0",
                         "Major version of cmake used to create the "
                         "Major version of cmake used to create the "
                         "current loaded cache",
                         "current loaded cache",
-                        cmState::INTERNAL);
+                        cmStateEnums::INTERNAL);
   }
   }
   // check to make sure the cache directory has not
   // check to make sure the cache directory has not
   // been moved
   // been moved
@@ -178,7 +178,7 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey,
                                        CacheEntry& e)
                                        CacheEntry& e)
 {
 {
   // All property entries are internal.
   // All property entries are internal.
-  if (e.Type != cmState::INTERNAL) {
+  if (e.Type != cmStateEnums::INTERNAL) {
     return false;
     return false;
   }
   }
 
 
@@ -192,7 +192,7 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey,
       if (it.IsAtEnd()) {
       if (it.IsAtEnd()) {
         // Create an entry and store the property.
         // Create an entry and store the property.
         CacheEntry& ne = this->Cache[key];
         CacheEntry& ne = this->Cache[key];
-        ne.Type = cmState::UNINITIALIZED;
+        ne.Type = cmStateEnums::UNINITIALIZED;
         ne.SetProperty(*p, e.Value.c_str());
         ne.SetProperty(*p, e.Value.c_str());
       } else {
       } else {
         // Store this property on its entry.
         // Store this property on its entry.
@@ -244,17 +244,17 @@ bool cmCacheManager::SaveCache(const std::string& path)
   this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", temp,
   this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", temp,
                       "Minor version of cmake used to create the "
                       "Minor version of cmake used to create the "
                       "current loaded cache",
                       "current loaded cache",
-                      cmState::INTERNAL);
+                      cmStateEnums::INTERNAL);
   sprintf(temp, "%d", cmVersion::GetMajorVersion());
   sprintf(temp, "%d", cmVersion::GetMajorVersion());
   this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", temp,
   this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", temp,
                       "Major version of cmake used to create the "
                       "Major version of cmake used to create the "
                       "current loaded cache",
                       "current loaded cache",
-                      cmState::INTERNAL);
+                      cmStateEnums::INTERNAL);
   sprintf(temp, "%d", cmVersion::GetPatchVersion());
   sprintf(temp, "%d", cmVersion::GetPatchVersion());
   this->AddCacheEntry("CMAKE_CACHE_PATCH_VERSION", temp,
   this->AddCacheEntry("CMAKE_CACHE_PATCH_VERSION", temp,
                       "Patch version of cmake used to create the "
                       "Patch version of cmake used to create the "
                       "current loaded cache",
                       "current loaded cache",
-                      cmState::INTERNAL);
+                      cmStateEnums::INTERNAL);
 
 
   // Let us store the current working directory so that if somebody
   // Let us store the current working directory so that if somebody
   // Copies it, he will not be surprised
   // Copies it, he will not be surprised
@@ -268,7 +268,7 @@ bool cmCacheManager::SaveCache(const std::string& path)
   this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(),
   this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(),
                       "This is the directory where this CMakeCache.txt"
                       "This is the directory where this CMakeCache.txt"
                       " was created",
                       " was created",
-                      cmState::INTERNAL);
+                      cmStateEnums::INTERNAL);
 
 
   /* clang-format off */
   /* clang-format off */
   fout << "# This is the CMakeCache file.\n"
   fout << "# This is the CMakeCache file.\n"
@@ -301,14 +301,14 @@ bool cmCacheManager::SaveCache(const std::string& path)
          this->Cache.begin();
          this->Cache.begin();
        i != this->Cache.end(); ++i) {
        i != this->Cache.end(); ++i) {
     const CacheEntry& ce = (*i).second;
     const CacheEntry& ce = (*i).second;
-    cmState::CacheEntryType t = ce.Type;
+    cmStateEnums::CacheEntryType t = ce.Type;
     if (!ce.Initialized) {
     if (!ce.Initialized) {
       /*
       /*
         // This should be added in, but is not for now.
         // This should be added in, but is not for now.
       cmSystemTools::Error("Cache entry \"", (*i).first.c_str(),
       cmSystemTools::Error("Cache entry \"", (*i).first.c_str(),
                            "\" is uninitialized");
                            "\" is uninitialized");
       */
       */
-    } else if (t != cmState::INTERNAL) {
+    } else if (t != cmStateEnums::INTERNAL) {
       // Format is key:type=value
       // Format is key:type=value
       if (const char* help = ce.GetProperty("HELPSTRING")) {
       if (const char* help = ce.GetProperty("HELPSTRING")) {
         cmCacheManager::OutputHelpString(fout, help);
         cmCacheManager::OutputHelpString(fout, help);
@@ -334,9 +334,9 @@ bool cmCacheManager::SaveCache(const std::string& path)
       continue;
       continue;
     }
     }
 
 
-    cmState::CacheEntryType t = i.GetType();
+    cmStateEnums::CacheEntryType t = i.GetType();
     this->WritePropertyEntries(fout, i);
     this->WritePropertyEntries(fout, i);
-    if (t == cmState::INTERNAL) {
+    if (t == cmStateEnums::INTERNAL) {
       // Format is key:type=value
       // Format is key:type=value
       if (const char* help = i.GetProperty("HELPSTRING")) {
       if (const char* help = i.GetProperty("HELPSTRING")) {
         this->OutputHelpString(fout, help);
         this->OutputHelpString(fout, help);
@@ -465,7 +465,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const
   for (std::map<std::string, CacheEntry>::const_iterator i =
   for (std::map<std::string, CacheEntry>::const_iterator i =
          this->Cache.begin();
          this->Cache.begin();
        i != this->Cache.end(); ++i) {
        i != this->Cache.end(); ++i) {
-    if ((*i).second.Type != cmState::INTERNAL) {
+    if ((*i).second.Type != cmStateEnums::INTERNAL) {
       out << (*i).first << " = " << (*i).second.Value << std::endl;
       out << (*i).first << " = " << (*i).second.Value << std::endl;
     }
     }
   }
   }
@@ -477,7 +477,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const
 
 
 void cmCacheManager::AddCacheEntry(const std::string& key, const char* value,
 void cmCacheManager::AddCacheEntry(const std::string& key, const char* value,
                                    const char* helpString,
                                    const char* helpString,
-                                   cmState::CacheEntryType type)
+                                   cmStateEnums::CacheEntryType type)
 {
 {
   CacheEntry& e = this->Cache[key];
   CacheEntry& e = this->Cache[key];
   if (value) {
   if (value) {
@@ -488,7 +488,7 @@ void cmCacheManager::AddCacheEntry(const std::string& key, const char* value,
   }
   }
   e.Type = type;
   e.Type = type;
   // make sure we only use unix style paths
   // make sure we only use unix style paths
-  if (type == cmState::FILEPATH || type == cmState::PATH) {
+  if (type == cmStateEnums::FILEPATH || type == cmStateEnums::PATH) {
     if (e.Value.find(';') != e.Value.npos) {
     if (e.Value.find(';') != e.Value.npos) {
       std::vector<std::string> paths;
       std::vector<std::string> paths;
       cmSystemTools::ExpandListArgument(e.Value, paths);
       cmSystemTools::ExpandListArgument(e.Value, paths);

+ 13 - 6
Source/cmCacheManager.h

@@ -34,7 +34,7 @@ private:
   struct CacheEntry
   struct CacheEntry
   {
   {
     std::string Value;
     std::string Value;
-    cmState::CacheEntryType Type;
+    cmStateEnums::CacheEntryType Type;
     cmPropertyMap Properties;
     cmPropertyMap Properties;
     std::vector<std::string> GetPropertyList() const;
     std::vector<std::string> GetPropertyList() const;
     const char* GetProperty(const std::string&) const;
     const char* GetProperty(const std::string&) const;
@@ -44,7 +44,7 @@ private:
     bool Initialized;
     bool Initialized;
     CacheEntry()
     CacheEntry()
       : Value("")
       : Value("")
-      , Type(cmState::UNINITIALIZED)
+      , Type(cmStateEnums::UNINITIALIZED)
       , Initialized(false)
       , Initialized(false)
     {
     {
     }
     }
@@ -70,8 +70,14 @@ public:
     const char* GetValue() const { return this->GetEntry().Value.c_str(); }
     const char* GetValue() const { return this->GetEntry().Value.c_str(); }
     bool GetValueAsBool() const;
     bool GetValueAsBool() const;
     void SetValue(const char*);
     void SetValue(const char*);
-    cmState::CacheEntryType GetType() const { return this->GetEntry().Type; }
-    void SetType(cmState::CacheEntryType ty) { this->GetEntry().Type = ty; }
+    cmStateEnums::CacheEntryType GetType() const
+    {
+      return this->GetEntry().Type;
+    }
+    void SetType(cmStateEnums::CacheEntryType ty)
+    {
+      this->GetEntry().Type = ty;
+    }
     bool Initialized() { return this->GetEntry().Initialized; }
     bool Initialized() { return this->GetEntry().Initialized; }
     cmCacheManager& Container;
     cmCacheManager& Container;
     std::map<std::string, CacheEntry>::iterator Position;
     std::map<std::string, CacheEntry>::iterator Position;
@@ -137,7 +143,7 @@ public:
     return this->GetCacheIterator(key.c_str()).GetProperty(propName);
     return this->GetCacheIterator(key.c_str()).GetProperty(propName);
   }
   }
 
 
-  cmState::CacheEntryType GetCacheEntryType(std::string const& key)
+  cmStateEnums::CacheEntryType GetCacheEntryType(std::string const& key)
   {
   {
     return this->GetCacheIterator(key.c_str()).GetType();
     return this->GetCacheIterator(key.c_str()).GetType();
   }
   }
@@ -200,7 +206,8 @@ public:
 protected:
 protected:
   ///! Add an entry into the cache
   ///! Add an entry into the cache
   void AddCacheEntry(const std::string& key, const char* value,
   void AddCacheEntry(const std::string& key, const char* value,
-                     const char* helpString, cmState::CacheEntryType type);
+                     const char* helpString,
+                     cmStateEnums::CacheEntryType type);
 
 
   ///! Get a cache entry object for a key
   ///! Get a cache entry object for a key
   CacheEntry* GetCacheEntry(const std::string& key);
   CacheEntry* GetCacheEntry(const std::string& key);

+ 1 - 1
Source/cmCoreTryCompile.cxx

@@ -531,7 +531,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
   // set the result var to the return value to indicate success or failure
   // set the result var to the return value to indicate success or failure
   this->Makefile->AddCacheDefinition(argv[0], (res == 0 ? "TRUE" : "FALSE"),
   this->Makefile->AddCacheDefinition(argv[0], (res == 0 ? "TRUE" : "FALSE"),
                                      "Result of TRY_COMPILE",
                                      "Result of TRY_COMPILE",
-                                     cmState::INTERNAL);
+                                     cmStateEnums::INTERNAL);
 
 
   if (!outputVariable.empty()) {
   if (!outputVariable.empty()) {
     this->Makefile->AddDefinition(outputVariable, output.c_str());
     this->Makefile->AddDefinition(outputVariable, output.c_str());

+ 3 - 2
Source/cmExtraEclipseCDT4Generator.cxx

@@ -230,7 +230,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out,
     // in the cache
     // in the cache
     valueToUse = envVarValue;
     valueToUse = envVarValue;
     mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
     mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
-                           cacheEntryName.c_str(), cmState::STRING, true);
+                           cacheEntryName.c_str(), cmStateEnums::STRING, true);
     mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory());
     mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory());
   } else if (!envVarSet && cacheValue != CM_NULLPTR) {
   } else if (!envVarSet && cacheValue != CM_NULLPTR) {
     // It is already in the cache, but not in the env, so use it from the cache
     // It is already in the cache, but not in the env, so use it from the cache
@@ -245,7 +245,8 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out,
     if (valueToUse.find(envVarValue) == std::string::npos) {
     if (valueToUse.find(envVarValue) == std::string::npos) {
       valueToUse = envVarValue;
       valueToUse = envVarValue;
       mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
       mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
-                             cacheEntryName.c_str(), cmState::STRING, true);
+                             cacheEntryName.c_str(), cmStateEnums::STRING,
+                             true);
       mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory());
       mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory());
     }
     }
   }
   }

+ 1 - 1
Source/cmFindBase.cxx

@@ -308,7 +308,7 @@ bool cmFindBase::CheckForVariableInCache()
       // this.
       // this.
       if (cached &&
       if (cached &&
           state->GetCacheEntryType(this->VariableName) ==
           state->GetCacheEntryType(this->VariableName) ==
-            cmState::UNINITIALIZED) {
+            cmStateEnums::UNINITIALIZED) {
         this->AlreadyInCacheWithoutMetaInfo = true;
         this->AlreadyInCacheWithoutMetaInfo = true;
       }
       }
       return true;
       return true;

+ 3 - 3
Source/cmFindLibraryCommand.cxx

@@ -26,7 +26,7 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn,
     if (this->AlreadyInCacheWithoutMetaInfo) {
     if (this->AlreadyInCacheWithoutMetaInfo) {
       this->Makefile->AddCacheDefinition(this->VariableName, "",
       this->Makefile->AddCacheDefinition(this->VariableName, "",
                                          this->VariableDocumentation.c_str(),
                                          this->VariableDocumentation.c_str(),
-                                         cmState::FILEPATH);
+                                         cmStateEnums::FILEPATH);
     }
     }
     return true;
     return true;
   }
   }
@@ -52,13 +52,13 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn,
     // Save the value in the cache
     // Save the value in the cache
     this->Makefile->AddCacheDefinition(this->VariableName, library.c_str(),
     this->Makefile->AddCacheDefinition(this->VariableName, library.c_str(),
                                        this->VariableDocumentation.c_str(),
                                        this->VariableDocumentation.c_str(),
-                                       cmState::FILEPATH);
+                                       cmStateEnums::FILEPATH);
     return true;
     return true;
   }
   }
   std::string notfound = this->VariableName + "-NOTFOUND";
   std::string notfound = this->VariableName + "-NOTFOUND";
   this->Makefile->AddCacheDefinition(this->VariableName, notfound.c_str(),
   this->Makefile->AddCacheDefinition(this->VariableName, notfound.c_str(),
                                      this->VariableDocumentation.c_str(),
                                      this->VariableDocumentation.c_str(),
-                                     cmState::FILEPATH);
+                                     cmStateEnums::FILEPATH);
   return true;
   return true;
 }
 }
 
 

+ 1 - 1
Source/cmFindPackageCommand.cxx

@@ -890,7 +890,7 @@ bool cmFindPackageCommand::FindConfig()
   help += ".";
   help += ".";
   // We force the value since we do not get here if it was already set.
   // We force the value since we do not get here if it was already set.
   this->Makefile->AddCacheDefinition(this->Variable, init.c_str(),
   this->Makefile->AddCacheDefinition(this->Variable, init.c_str(),
-                                     help.c_str(), cmState::PATH, true);
+                                     help.c_str(), cmStateEnums::PATH, true);
   return found;
   return found;
 }
 }
 
 

+ 4 - 3
Source/cmFindPathCommand.cxx

@@ -26,7 +26,8 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn,
     if (this->AlreadyInCacheWithoutMetaInfo) {
     if (this->AlreadyInCacheWithoutMetaInfo) {
       this->Makefile->AddCacheDefinition(
       this->Makefile->AddCacheDefinition(
         this->VariableName, "", this->VariableDocumentation.c_str(),
         this->VariableName, "", this->VariableDocumentation.c_str(),
-        (this->IncludeFileInPath ? cmState::FILEPATH : cmState::PATH));
+        (this->IncludeFileInPath ? cmStateEnums::FILEPATH
+                                 : cmStateEnums::PATH));
     }
     }
     return true;
     return true;
   }
   }
@@ -35,13 +36,13 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn,
   if (!result.empty()) {
   if (!result.empty()) {
     this->Makefile->AddCacheDefinition(
     this->Makefile->AddCacheDefinition(
       this->VariableName, result.c_str(), this->VariableDocumentation.c_str(),
       this->VariableName, result.c_str(), this->VariableDocumentation.c_str(),
-      (this->IncludeFileInPath) ? cmState::FILEPATH : cmState::PATH);
+      (this->IncludeFileInPath) ? cmStateEnums::FILEPATH : cmStateEnums::PATH);
     return true;
     return true;
   }
   }
   this->Makefile->AddCacheDefinition(
   this->Makefile->AddCacheDefinition(
     this->VariableName, (this->VariableName + "-NOTFOUND").c_str(),
     this->VariableName, (this->VariableName + "-NOTFOUND").c_str(),
     this->VariableDocumentation.c_str(),
     this->VariableDocumentation.c_str(),
-    (this->IncludeFileInPath) ? cmState::FILEPATH : cmState::PATH);
+    (this->IncludeFileInPath) ? cmStateEnums::FILEPATH : cmStateEnums::PATH);
   return true;
   return true;
 }
 }
 
 

+ 3 - 3
Source/cmFindProgramCommand.cxx

@@ -90,7 +90,7 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn,
     if (this->AlreadyInCacheWithoutMetaInfo) {
     if (this->AlreadyInCacheWithoutMetaInfo) {
       this->Makefile->AddCacheDefinition(this->VariableName, "",
       this->Makefile->AddCacheDefinition(this->VariableName, "",
                                          this->VariableDocumentation.c_str(),
                                          this->VariableDocumentation.c_str(),
-                                         cmState::FILEPATH);
+                                         cmStateEnums::FILEPATH);
     }
     }
     return true;
     return true;
   }
   }
@@ -100,13 +100,13 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn,
     // Save the value in the cache
     // Save the value in the cache
     this->Makefile->AddCacheDefinition(this->VariableName, result.c_str(),
     this->Makefile->AddCacheDefinition(this->VariableName, result.c_str(),
                                        this->VariableDocumentation.c_str(),
                                        this->VariableDocumentation.c_str(),
-                                       cmState::FILEPATH);
+                                       cmStateEnums::FILEPATH);
 
 
     return true;
     return true;
   }
   }
   this->Makefile->AddCacheDefinition(
   this->Makefile->AddCacheDefinition(
     this->VariableName, (this->VariableName + "-NOTFOUND").c_str(),
     this->VariableName, (this->VariableName + "-NOTFOUND").c_str(),
-    this->VariableDocumentation.c_str(), cmState::FILEPATH);
+    this->VariableDocumentation.c_str(), cmStateEnums::FILEPATH);
   return true;
   return true;
 }
 }
 
 

+ 6 - 6
Source/cmGetFilenameComponentCommand.cxx

@@ -88,13 +88,13 @@ bool cmGetFilenameComponentCommand::InitialPass(
 
 
   if (args.size() >= 4 && args[args.size() - 1] == "CACHE") {
   if (args.size() >= 4 && args[args.size() - 1] == "CACHE") {
     if (!programArgs.empty() && !storeArgs.empty()) {
     if (!programArgs.empty() && !storeArgs.empty()) {
-      this->Makefile->AddCacheDefinition(storeArgs, programArgs.c_str(), "",
-                                         args[2] == "PATH" ? cmState::FILEPATH
-                                                           : cmState::STRING);
+      this->Makefile->AddCacheDefinition(
+        storeArgs, programArgs.c_str(), "",
+        args[2] == "PATH" ? cmStateEnums::FILEPATH : cmStateEnums::STRING);
     }
     }
-    this->Makefile->AddCacheDefinition(args[0], result.c_str(), "",
-                                       args[2] == "PATH" ? cmState::FILEPATH
-                                                         : cmState::STRING);
+    this->Makefile->AddCacheDefinition(
+      args[0], result.c_str(), "",
+      args[2] == "PATH" ? cmStateEnums::FILEPATH : cmStateEnums::STRING);
   } else {
   } else {
     if (!programArgs.empty() && !storeArgs.empty()) {
     if (!programArgs.empty() && !storeArgs.empty()) {
       this->Makefile->AddDefinition(storeArgs, programArgs.c_str());
       this->Makefile->AddDefinition(storeArgs, programArgs.c_str());

+ 4 - 4
Source/cmGlobalGenerator.cxx

@@ -308,7 +308,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
     makeProgram += "/";
     makeProgram += "/";
     makeProgram += saveFile;
     makeProgram += saveFile;
     mf->AddCacheDefinition("CMAKE_MAKE_PROGRAM", makeProgram.c_str(),
     mf->AddCacheDefinition("CMAKE_MAKE_PROGRAM", makeProgram.c_str(),
-                           "make program", cmState::FILEPATH);
+                           "make program", cmStateEnums::FILEPATH);
   }
   }
 }
 }
 
 
@@ -1103,7 +1103,7 @@ void cmGlobalGenerator::Configure()
   sprintf(num, "%d", static_cast<int>(this->Makefiles.size()));
   sprintf(num, "%d", static_cast<int>(this->Makefiles.size()));
   this->GetCMakeInstance()->AddCacheEntry("CMAKE_NUMBER_OF_MAKEFILES", num,
   this->GetCMakeInstance()->AddCacheEntry("CMAKE_NUMBER_OF_MAKEFILES", num,
                                           "number of local generators",
                                           "number of local generators",
-                                          cmState::INTERNAL);
+                                          cmStateEnums::INTERNAL);
 
 
   // check for link libraries and include directories containing "NOTFOUND"
   // check for link libraries and include directories containing "NOTFOUND"
   // and for infinite loops
   // and for infinite loops
@@ -1886,8 +1886,8 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator* gen,
   this->TryCompileOuterMakefile = mf;
   this->TryCompileOuterMakefile = mf;
   const char* make =
   const char* make =
     gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM");
     gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM");
-  this->GetCMakeInstance()->AddCacheEntry("CMAKE_MAKE_PROGRAM", make,
-                                          "make program", cmState::FILEPATH);
+  this->GetCMakeInstance()->AddCacheEntry(
+    "CMAKE_MAKE_PROGRAM", make, "make program", cmStateEnums::FILEPATH);
   // copy the enabled languages
   // copy the enabled languages
   this->GetCMakeInstance()->GetState()->SetEnabledLanguages(
   this->GetCMakeInstance()->GetState()->SetEnabledLanguages(
     gen->GetCMakeInstance()->GetState()->GetEnabledLanguages());
     gen->GetCMakeInstance()->GetState()->GetEnabledLanguages());

+ 1 - 1
Source/cmGlobalUnixMakefileGenerator3.cxx

@@ -93,7 +93,7 @@ std::string cmGlobalUnixMakefileGenerator3::GetEditCacheCommand() const
     if (!editCacheCommand.empty()) {
     if (!editCacheCommand.empty()) {
       cm->AddCacheEntry("CMAKE_EDIT_COMMAND", editCacheCommand.c_str(),
       cm->AddCacheEntry("CMAKE_EDIT_COMMAND", editCacheCommand.c_str(),
                         "Path to cache edit program executable.",
                         "Path to cache edit program executable.",
-                        cmState::INTERNAL);
+                        cmStateEnums::INTERNAL);
     }
     }
   }
   }
   const char* edit_cmd = cm->GetCacheDefinition("CMAKE_EDIT_COMMAND");
   const char* edit_cmd = cm->GetCacheDefinition("CMAKE_EDIT_COMMAND");

+ 2 - 2
Source/cmGlobalVisualStudio7Generator.cxx

@@ -101,7 +101,7 @@ void cmGlobalVisualStudio7Generator::EnableLanguage(
       "Semicolon separated list of supported configuration types, "
       "Semicolon separated list of supported configuration types, "
       "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
       "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
       "anything else will be ignored.",
       "anything else will be ignored.",
-      cmState::STRING);
+      cmStateEnums::STRING);
   }
   }
 
 
   // Create list of configurations requested by user's cache, if any.
   // Create list of configurations requested by user's cache, if any.
@@ -118,7 +118,7 @@ void cmGlobalVisualStudio7Generator::EnableLanguage(
   if (cmSystemTools::GetEnv("CMAKE_MSVCIDE_RUN_PATH", extraPath)) {
   if (cmSystemTools::GetEnv("CMAKE_MSVCIDE_RUN_PATH", extraPath)) {
     mf->AddCacheDefinition("CMAKE_MSVCIDE_RUN_PATH", extraPath.c_str(),
     mf->AddCacheDefinition("CMAKE_MSVCIDE_RUN_PATH", extraPath.c_str(),
                            "Saved environment variable CMAKE_MSVCIDE_RUN_PATH",
                            "Saved environment variable CMAKE_MSVCIDE_RUN_PATH",
-                           cmState::STATIC);
+                           cmStateEnums::STATIC);
   }
   }
 }
 }
 
 

+ 4 - 3
Source/cmGlobalXCodeGenerator.cxx

@@ -257,7 +257,7 @@ void cmGlobalXCodeGenerator::EnableLanguage(
         "Semicolon separated list of supported configuration types, "
         "Semicolon separated list of supported configuration types, "
         "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
         "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
         "anything else will be ignored.",
         "anything else will be ignored.",
-        cmState::STRING);
+        cmStateEnums::STRING);
     }
     }
   }
   }
   mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
   mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
@@ -2432,8 +2432,9 @@ std::string cmGlobalXCodeGenerator::GetOrCreateId(const std::string& name,
     return storedGUID;
     return storedGUID;
   }
   }
 
 
-  this->CMakeInstance->AddCacheEntry(
-    guidStoreName, id.c_str(), "Stored Xcode object GUID", cmState::INTERNAL);
+  this->CMakeInstance->AddCacheEntry(guidStoreName, id.c_str(),
+                                     "Stored Xcode object GUID",
+                                     cmStateEnums::INTERNAL);
 
 
   return id;
   return id;
 }
 }

+ 1 - 1
Source/cmIncludeExternalMSProjectCommand.cxx

@@ -66,7 +66,7 @@ bool cmIncludeExternalMSProjectCommand::InitialPass(
       std::string guidVariable = utility_name + "_GUID_CMAKE";
       std::string guidVariable = utility_name + "_GUID_CMAKE";
       this->Makefile->GetCMakeInstance()->AddCacheEntry(
       this->Makefile->GetCMakeInstance()->AddCacheEntry(
         guidVariable.c_str(), customGuid.c_str(), "Stored GUID",
         guidVariable.c_str(), customGuid.c_str(), "Stored GUID",
-        cmState::INTERNAL);
+        cmStateEnums::INTERNAL);
     }
     }
 
 
     // Create a target instance for this utility.
     // Create a target instance for this utility.

+ 1 - 1
Source/cmLoadCacheCommand.cxx

@@ -140,7 +140,7 @@ void cmLoadCacheCommand::CheckLine(const char* line)
   // Check one line of the cache file.
   // Check one line of the cache file.
   std::string var;
   std::string var;
   std::string value;
   std::string value;
-  cmState::CacheEntryType type = cmState::UNINITIALIZED;
+  cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED;
   if (cmake::ParseCacheEntry(line, var, value, type)) {
   if (cmake::ParseCacheEntry(line, var, value, type)) {
     // Found a real entry.  See if this one was requested.
     // Found a real entry.  See if this one was requested.
     if (this->VariablesToRead.find(var) != this->VariablesToRead.end()) {
     if (this->VariablesToRead.find(var) != this->VariablesToRead.end()) {

+ 1 - 1
Source/cmLocalVisualStudio10Generator.cxx

@@ -95,7 +95,7 @@ void cmLocalVisualStudio10Generator::ReadAndStoreExternalGUID(
   // save the GUID in the cache
   // save the GUID in the cache
   this->GlobalGenerator->GetCMakeInstance()->AddCacheEntry(
   this->GlobalGenerator->GetCMakeInstance()->AddCacheEntry(
     guidStoreName.c_str(), parser.GUID.c_str(), "Stored GUID",
     guidStoreName.c_str(), parser.GUID.c_str(), "Stored GUID",
-    cmState::INTERNAL);
+    cmStateEnums::INTERNAL);
 }
 }
 
 
 const char* cmLocalVisualStudio10Generator::ReportErrorLabel() const
 const char* cmLocalVisualStudio10Generator::ReportErrorLabel() const

+ 1 - 1
Source/cmLocalVisualStudio7Generator.cxx

@@ -2118,7 +2118,7 @@ void cmLocalVisualStudio7Generator::ReadAndStoreExternalGUID(
   // save the GUID in the cache
   // save the GUID in the cache
   this->GlobalGenerator->GetCMakeInstance()->AddCacheEntry(
   this->GlobalGenerator->GetCMakeInstance()->AddCacheEntry(
     guidStoreName.c_str(), parser.GUID.c_str(), "Stored GUID",
     guidStoreName.c_str(), parser.GUID.c_str(), "Stored GUID",
-    cmState::INTERNAL);
+    cmStateEnums::INTERNAL);
 }
 }
 
 
 std::string cmLocalVisualStudio7Generator::GetTargetDirectory(
 std::string cmLocalVisualStudio7Generator::GetTargetDirectory(

+ 8 - 7
Source/cmMakefile.cxx

@@ -1643,20 +1643,21 @@ void cmMakefile::AddDefinition(const std::string& name, const char* value)
 
 
 void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
 void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
                                     const char* doc,
                                     const char* doc,
-                                    cmState::CacheEntryType type, bool force)
+                                    cmStateEnums::CacheEntryType type,
+                                    bool force)
 {
 {
   const char* existingValue = this->GetState()->GetInitializedCacheValue(name);
   const char* existingValue = this->GetState()->GetInitializedCacheValue(name);
   // must be outside the following if() to keep it alive long enough
   // must be outside the following if() to keep it alive long enough
   std::string nvalue;
   std::string nvalue;
 
 
-  if (existingValue &&
-      (this->GetState()->GetCacheEntryType(name) == cmState::UNINITIALIZED)) {
+  if (existingValue && (this->GetState()->GetCacheEntryType(name) ==
+                        cmStateEnums::UNINITIALIZED)) {
     // if this is not a force, then use the value from the cache
     // if this is not a force, then use the value from the cache
     // if it is a force, then use the value being passed in
     // if it is a force, then use the value being passed in
     if (!force) {
     if (!force) {
       value = existingValue;
       value = existingValue;
     }
     }
-    if (type == cmState::PATH || type == cmState::FILEPATH) {
+    if (type == cmStateEnums::PATH || type == cmStateEnums::FILEPATH) {
       std::vector<std::string>::size_type cc;
       std::vector<std::string>::size_type cc;
       std::vector<std::string> files;
       std::vector<std::string> files;
       nvalue = value ? value : "";
       nvalue = value ? value : "";
@@ -3177,7 +3178,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
       // Add this before the user-provided CMake arguments in case
       // Add this before the user-provided CMake arguments in case
       // one of the arguments is -DCMAKE_BUILD_TYPE=...
       // one of the arguments is -DCMAKE_BUILD_TYPE=...
       cm.AddCacheEntry("CMAKE_BUILD_TYPE", config, "Build configuration",
       cm.AddCacheEntry("CMAKE_BUILD_TYPE", config, "Build configuration",
-                       cmState::STRING);
+                       cmStateEnums::STRING);
     }
     }
   }
   }
   // if cmake args were provided then pass them in
   // if cmake args were provided then pass them in
@@ -3213,10 +3214,10 @@ int cmMakefile::TryCompile(const std::string& srcdir,
   gg->EnableLanguagesFromGenerator(this->GetGlobalGenerator(), this);
   gg->EnableLanguagesFromGenerator(this->GetGlobalGenerator(), this);
   if (this->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS")) {
   if (this->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS")) {
     cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE", "",
     cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE", "",
-                     cmState::INTERNAL);
+                     cmStateEnums::INTERNAL);
   } else {
   } else {
     cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE", "",
     cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE", "",
-                     cmState::INTERNAL);
+                     cmStateEnums::INTERNAL);
   }
   }
   if (cm.Configure() != 0) {
   if (cm.Configure() != 0) {
     cmSystemTools::Error(
     cmSystemTools::Error(

+ 1 - 1
Source/cmMakefile.h

@@ -224,7 +224,7 @@ public:
   void AddDefinition(const std::string& name, const char* value);
   void AddDefinition(const std::string& name, const char* value);
   ///! Add a definition to this makefile and the global cmake cache.
   ///! Add a definition to this makefile and the global cmake cache.
   void AddCacheDefinition(const std::string& name, const char* value,
   void AddCacheDefinition(const std::string& name, const char* value,
-                          const char* doc, cmState::CacheEntryType type,
+                          const char* doc, cmStateEnums::CacheEntryType type,
                           bool force = false);
                           bool force = false);
 
 
   /**
   /**

+ 1 - 1
Source/cmMarkAsAdvancedCommand.cxx

@@ -26,7 +26,7 @@ bool cmMarkAsAdvancedCommand::InitialPass(std::vector<std::string> const& args,
     cmState* state = this->Makefile->GetState();
     cmState* state = this->Makefile->GetState();
     if (!state->GetCacheEntryValue(variable)) {
     if (!state->GetCacheEntryValue(variable)) {
       this->Makefile->GetCMakeInstance()->AddCacheEntry(
       this->Makefile->GetCMakeInstance()->AddCacheEntry(
-        variable, CM_NULLPTR, CM_NULLPTR, cmState::UNINITIALIZED);
+        variable, CM_NULLPTR, CM_NULLPTR, cmStateEnums::UNINITIALIZED);
       overwrite = true;
       overwrite = true;
     }
     }
     if (!state->GetCacheEntryValue(variable)) {
     if (!state->GetCacheEntryValue(variable)) {

+ 2 - 2
Source/cmOptionCommand.cxx

@@ -32,7 +32,7 @@ bool cmOptionCommand::InitialPass(std::vector<std::string> const& args,
   cmState* state = this->Makefile->GetState();
   cmState* state = this->Makefile->GetState();
   const char* existingValue = state->GetCacheEntryValue(args[0]);
   const char* existingValue = state->GetCacheEntryValue(args[0]);
   if (existingValue) {
   if (existingValue) {
-    if (state->GetCacheEntryType(args[0]) != cmState::UNINITIALIZED) {
+    if (state->GetCacheEntryType(args[0]) != cmStateEnums::UNINITIALIZED) {
       state->SetCacheEntryProperty(args[0], "HELPSTRING", args[1]);
       state->SetCacheEntryProperty(args[0], "HELPSTRING", args[1]);
       return true;
       return true;
     }
     }
@@ -43,6 +43,6 @@ bool cmOptionCommand::InitialPass(std::vector<std::string> const& args,
   }
   }
   bool init = cmSystemTools::IsOn(initialValue.c_str());
   bool init = cmSystemTools::IsOn(initialValue.c_str());
   this->Makefile->AddCacheDefinition(args[0], init ? "ON" : "OFF",
   this->Makefile->AddCacheDefinition(args[0], init ? "ON" : "OFF",
-                                     args[1].c_str(), cmState::BOOL);
+                                     args[1].c_str(), cmStateEnums::BOOL);
   return true;
   return true;
 }
 }

+ 1 - 1
Source/cmPolicies.cxx

@@ -233,7 +233,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, const char* version)
               "For backwards compatibility, what version of CMake "
               "For backwards compatibility, what version of CMake "
               "commands and "
               "commands and "
               "syntax should this version of CMake try to support.",
               "syntax should this version of CMake try to support.",
-              cmState::STRING);
+              cmStateEnums::STRING);
           }
           }
         }
         }
       }
       }

+ 3 - 3
Source/cmProjectCommand.cxx

@@ -19,10 +19,10 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
 
 
   this->Makefile->AddCacheDefinition(
   this->Makefile->AddCacheDefinition(
     bindir, this->Makefile->GetCurrentBinaryDirectory(),
     bindir, this->Makefile->GetCurrentBinaryDirectory(),
-    "Value Computed by CMake", cmState::STATIC);
+    "Value Computed by CMake", cmStateEnums::STATIC);
   this->Makefile->AddCacheDefinition(
   this->Makefile->AddCacheDefinition(
     srcdir, this->Makefile->GetCurrentSourceDirectory(),
     srcdir, this->Makefile->GetCurrentSourceDirectory(),
-    "Value Computed by CMake", cmState::STATIC);
+    "Value Computed by CMake", cmStateEnums::STATIC);
 
 
   bindir = "PROJECT_BINARY_DIR";
   bindir = "PROJECT_BINARY_DIR";
   srcdir = "PROJECT_SOURCE_DIR";
   srcdir = "PROJECT_SOURCE_DIR";
@@ -45,7 +45,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
     this->Makefile->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str());
     this->Makefile->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str());
     this->Makefile->AddCacheDefinition("CMAKE_PROJECT_NAME", args[0].c_str(),
     this->Makefile->AddCacheDefinition("CMAKE_PROJECT_NAME", args[0].c_str(),
                                        "Value Computed by CMake",
                                        "Value Computed by CMake",
-                                       cmState::STATIC);
+                                       cmStateEnums::STATIC);
   }
   }
 
 
   bool haveVersion = false;
   bool haveVersion = false;

+ 5 - 4
Source/cmSetCommand.cxx

@@ -64,8 +64,9 @@ bool cmSetCommand::InitialPass(std::vector<std::string> const& args,
   bool cache = false; // optional
   bool cache = false; // optional
   bool force = false; // optional
   bool force = false; // optional
   bool parentScope = false;
   bool parentScope = false;
-  cmState::CacheEntryType type = cmState::STRING; // required if cache
-  const char* docstring = CM_NULLPTR;             // required if cache
+  cmStateEnums::CacheEntryType type =
+    cmStateEnums::STRING;             // required if cache
+  const char* docstring = CM_NULLPTR; // required if cache
 
 
   unsigned int ignoreLastArgs = 0;
   unsigned int ignoreLastArgs = 0;
   // look for PARENT_SCOPE argument
   // look for PARENT_SCOPE argument
@@ -115,12 +116,12 @@ bool cmSetCommand::InitialPass(std::vector<std::string> const& args,
   cmState* state = this->Makefile->GetState();
   cmState* state = this->Makefile->GetState();
   const char* existingValue = state->GetCacheEntryValue(variable);
   const char* existingValue = state->GetCacheEntryValue(variable);
   if (existingValue &&
   if (existingValue &&
-      (state->GetCacheEntryType(variable) != cmState::UNINITIALIZED)) {
+      (state->GetCacheEntryType(variable) != cmStateEnums::UNINITIALIZED)) {
     // if the set is trying to CACHE the value but the value
     // if the set is trying to CACHE the value but the value
     // is already in the cache and the type is not internal
     // is already in the cache and the type is not internal
     // then leave now without setting any definitions in the cache
     // then leave now without setting any definitions in the cache
     // or the makefile
     // or the makefile
-    if (cache && type != cmState::INTERNAL && !force) {
+    if (cache && type != cmStateEnums::INTERNAL && !force) {
       return true;
       return true;
     }
     }
   }
   }

+ 2 - 1
Source/cmSiteNameCommand.cxx

@@ -68,7 +68,8 @@ bool cmSiteNameCommand::InitialPass(std::vector<std::string> const& args,
 #endif
 #endif
   this->Makefile->AddCacheDefinition(
   this->Makefile->AddCacheDefinition(
     args[0], siteName.c_str(),
     args[0], siteName.c_str(),
-    "Name of the computer/site where compile is being run", cmState::STRING);
+    "Name of the computer/site where compile is being run",
+    cmStateEnums::STRING);
 
 
   return true;
   return true;
 }
 }

+ 8 - 7
Source/cmState.cxx

@@ -147,7 +147,7 @@ const char* cmCacheEntryTypes[] = { "BOOL",          "PATH",     "FILEPATH",
                                     "STRING",        "INTERNAL", "STATIC",
                                     "STRING",        "INTERNAL", "STATIC",
                                     "UNINITIALIZED", CM_NULLPTR };
                                     "UNINITIALIZED", CM_NULLPTR };
 
 
-const char* cmState::CacheEntryTypeToString(cmState::CacheEntryType type)
+const char* cmState::CacheEntryTypeToString(cmStateEnums::CacheEntryType type)
 {
 {
   if (type > 6) {
   if (type > 6) {
     return cmCacheEntryTypes[6];
     return cmCacheEntryTypes[6];
@@ -155,16 +155,16 @@ const char* cmState::CacheEntryTypeToString(cmState::CacheEntryType type)
   return cmCacheEntryTypes[type];
   return cmCacheEntryTypes[type];
 }
 }
 
 
-cmState::CacheEntryType cmState::StringToCacheEntryType(const char* s)
+cmStateEnums::CacheEntryType cmState::StringToCacheEntryType(const char* s)
 {
 {
   int i = 0;
   int i = 0;
   while (cmCacheEntryTypes[i]) {
   while (cmCacheEntryTypes[i]) {
     if (strcmp(s, cmCacheEntryTypes[i]) == 0) {
     if (strcmp(s, cmCacheEntryTypes[i]) == 0) {
-      return static_cast<cmState::CacheEntryType>(i);
+      return static_cast<cmStateEnums::CacheEntryType>(i);
     }
     }
     ++i;
     ++i;
   }
   }
-  return STRING;
+  return cmStateEnums::STRING;
 }
 }
 
 
 bool cmState::IsCacheEntryType(std::string const& key)
 bool cmState::IsCacheEntryType(std::string const& key)
@@ -219,7 +219,7 @@ const char* cmState::GetInitializedCacheValue(std::string const& key) const
   return this->CacheManager->GetInitializedCacheValue(key);
   return this->CacheManager->GetInitializedCacheValue(key);
 }
 }
 
 
-cmState::CacheEntryType cmState::GetCacheEntryType(
+cmStateEnums::CacheEntryType cmState::GetCacheEntryType(
   std::string const& key) const
   std::string const& key) const
 {
 {
   cmCacheManager::CacheIterator it =
   cmCacheManager::CacheIterator it =
@@ -279,7 +279,7 @@ bool cmState::GetCacheEntryPropertyAsBool(std::string const& key,
 
 
 void cmState::AddCacheEntry(const std::string& key, const char* value,
 void cmState::AddCacheEntry(const std::string& key, const char* value,
                             const char* helpString,
                             const char* helpString,
-                            cmState::CacheEntryType type)
+                            cmStateEnums::CacheEntryType type)
 {
 {
   this->CacheManager->AddCacheEntry(key, value, helpString, type);
   this->CacheManager->AddCacheEntry(key, value, helpString, type);
 }
 }
@@ -1806,7 +1806,8 @@ static bool ParseEntryWithoutType(const std::string& entry, std::string& var,
 }
 }
 
 
 bool cmState::ParseCacheEntry(const std::string& entry, std::string& var,
 bool cmState::ParseCacheEntry(const std::string& entry, std::string& var,
-                              std::string& value, CacheEntryType& type)
+                              std::string& value,
+                              cmStateEnums::CacheEntryType& type)
 {
 {
   // input line is:         key:type=value
   // input line is:         key:type=value
   static cmsys::RegularExpression reg(
   static cmsys::RegularExpression reg(

+ 17 - 15
Source/cmState.h

@@ -56,6 +56,16 @@ enum TargetType
   INTERFACE_LIBRARY,
   INTERFACE_LIBRARY,
   UNKNOWN_LIBRARY
   UNKNOWN_LIBRARY
 };
 };
+enum CacheEntryType
+{
+  BOOL = 0,
+  PATH,
+  FILEPATH,
+  STRING,
+  INTERNAL,
+  STATIC,
+  UNINITIALIZED
+};
 }
 }
 
 
 class cmState
 class cmState
@@ -214,18 +224,8 @@ public:
   Snapshot CreatePolicyScopeSnapshot(Snapshot originSnapshot);
   Snapshot CreatePolicyScopeSnapshot(Snapshot originSnapshot);
   Snapshot Pop(Snapshot originSnapshot);
   Snapshot Pop(Snapshot originSnapshot);
 
 
-  enum CacheEntryType
-  {
-    BOOL = 0,
-    PATH,
-    FILEPATH,
-    STRING,
-    INTERNAL,
-    STATIC,
-    UNINITIALIZED
-  };
-  static CacheEntryType StringToCacheEntryType(const char*);
-  static const char* CacheEntryTypeToString(CacheEntryType);
+  static cmStateEnums::CacheEntryType StringToCacheEntryType(const char*);
+  static const char* CacheEntryTypeToString(cmStateEnums::CacheEntryType);
   static bool IsCacheEntryType(std::string const& key);
   static bool IsCacheEntryType(std::string const& key);
 
 
   bool LoadCache(const std::string& path, bool internal,
   bool LoadCache(const std::string& path, bool internal,
@@ -239,7 +239,7 @@ public:
   std::vector<std::string> GetCacheEntryKeys() const;
   std::vector<std::string> GetCacheEntryKeys() const;
   const char* GetCacheEntryValue(std::string const& key) const;
   const char* GetCacheEntryValue(std::string const& key) const;
   const char* GetInitializedCacheValue(std::string const& key) const;
   const char* GetInitializedCacheValue(std::string const& key) const;
-  CacheEntryType GetCacheEntryType(std::string const& key) const;
+  cmStateEnums::CacheEntryType GetCacheEntryType(std::string const& key) const;
   void SetCacheEntryValue(std::string const& key, std::string const& value);
   void SetCacheEntryValue(std::string const& key, std::string const& value);
   void SetCacheValue(std::string const& key, std::string const& value);
   void SetCacheValue(std::string const& key, std::string const& value);
 
 
@@ -264,7 +264,8 @@ public:
 
 
   ///! Break up a line like VAR:type="value" into var, type and value
   ///! Break up a line like VAR:type="value" into var, type and value
   static bool ParseCacheEntry(const std::string& entry, std::string& var,
   static bool ParseCacheEntry(const std::string& entry, std::string& var,
-                              std::string& value, CacheEntryType& type);
+                              std::string& value,
+                              cmStateEnums::CacheEntryType& type);
 
 
   Snapshot Reset();
   Snapshot Reset();
   // Define a property
   // Define a property
@@ -328,7 +329,8 @@ public:
 private:
 private:
   friend class cmake;
   friend class cmake;
   void AddCacheEntry(const std::string& key, const char* value,
   void AddCacheEntry(const std::string& key, const char* value,
-                     const char* helpString, CacheEntryType type);
+                     const char* helpString,
+                     cmStateEnums::CacheEntryType type);
 
 
   std::map<cmProperty::ScopeType, cmPropertyDefinitionMap> PropertyDefinitions;
   std::map<cmProperty::ScopeType, cmPropertyDefinitionMap> PropertyDefinitions;
   std::vector<std::string> EnabledLanguages;
   std::vector<std::string> EnabledLanguages;

+ 2 - 2
Source/cmTarget.cxx

@@ -635,7 +635,7 @@ void cmTarget::ClearDependencyInformation(cmMakefile& mf,
   depname += "_LIB_DEPENDS";
   depname += "_LIB_DEPENDS";
   if (this->RecordDependencies) {
   if (this->RecordDependencies) {
     mf.AddCacheDefinition(depname, "", "Dependencies for target",
     mf.AddCacheDefinition(depname, "", "Dependencies for target",
-                          cmState::STATIC);
+                          cmStateEnums::STATIC);
   } else {
   } else {
     if (mf.GetDefinition(depname)) {
     if (mf.GetDefinition(depname)) {
       std::string message = "Target ";
       std::string message = "Target ";
@@ -773,7 +773,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib,
     dependencies += lib;
     dependencies += lib;
     dependencies += ";";
     dependencies += ";";
     mf.AddCacheDefinition(targetEntry, dependencies.c_str(),
     mf.AddCacheDefinition(targetEntry, dependencies.c_str(),
-                          "Dependencies for the target", cmState::STATIC);
+                          "Dependencies for the target", cmStateEnums::STATIC);
   }
   }
 }
 }
 
 

+ 6 - 5
Source/cmTryRunCommand.cxx

@@ -189,7 +189,8 @@ void cmTryRunCommand::RunExecutable(const std::string& runArgs,
     strcpy(retChar, "FAILED_TO_RUN");
     strcpy(retChar, "FAILED_TO_RUN");
   }
   }
   this->Makefile->AddCacheDefinition(this->RunResultVariable, retChar,
   this->Makefile->AddCacheDefinition(this->RunResultVariable, retChar,
-                                     "Result of TRY_RUN", cmState::INTERNAL);
+                                     "Result of TRY_RUN",
+                                     cmStateEnums::INTERNAL);
 }
 }
 
 
 /* This is only used when cross compiling. Instead of running the
 /* This is only used when cross compiling. Instead of running the
@@ -231,7 +232,7 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs,
     comment += detailsString;
     comment += detailsString;
     this->Makefile->AddCacheDefinition(this->RunResultVariable,
     this->Makefile->AddCacheDefinition(this->RunResultVariable,
                                        "PLEASE_FILL_OUT-FAILED_TO_RUN",
                                        "PLEASE_FILL_OUT-FAILED_TO_RUN",
-                                       comment.c_str(), cmState::STRING);
+                                       comment.c_str(), cmStateEnums::STRING);
 
 
     cmState* state = this->Makefile->GetState();
     cmState* state = this->Makefile->GetState();
     const char* existingValue =
     const char* existingValue =
@@ -254,9 +255,9 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs,
         "would have printed on stdout and stderr on its target platform.\n";
         "would have printed on stdout and stderr on its target platform.\n";
       comment += detailsString;
       comment += detailsString;
 
 
-      this->Makefile->AddCacheDefinition(internalRunOutputName,
-                                         "PLEASE_FILL_OUT-NOTFOUND",
-                                         comment.c_str(), cmState::STRING);
+      this->Makefile->AddCacheDefinition(
+        internalRunOutputName, "PLEASE_FILL_OUT-NOTFOUND", comment.c_str(),
+        cmStateEnums::STRING);
       cmState* state = this->Makefile->GetState();
       cmState* state = this->Makefile->GetState();
       const char* existing = state->GetCacheEntryValue(internalRunOutputName);
       const char* existing = state->GetCacheEntryValue(internalRunOutputName);
       if (existing) {
       if (existing) {

+ 2 - 2
Source/cmUtilitySourceCommand.cxx

@@ -98,13 +98,13 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args,
   // Enter the value into the cache.
   // Enter the value into the cache.
   this->Makefile->AddCacheDefinition(cacheEntry, utilityExecutable.c_str(),
   this->Makefile->AddCacheDefinition(cacheEntry, utilityExecutable.c_str(),
                                      "Path to an internal program.",
                                      "Path to an internal program.",
-                                     cmState::FILEPATH);
+                                     cmStateEnums::FILEPATH);
   // add a value into the cache that maps from the
   // add a value into the cache that maps from the
   // full path to the name of the project
   // full path to the name of the project
   cmSystemTools::ConvertToUnixSlashes(utilityExecutable);
   cmSystemTools::ConvertToUnixSlashes(utilityExecutable);
   this->Makefile->AddCacheDefinition(utilityExecutable, utilityName.c_str(),
   this->Makefile->AddCacheDefinition(utilityExecutable, utilityName.c_str(),
                                      "Executable to project name.",
                                      "Executable to project name.",
-                                     cmState::INTERNAL);
+                                     cmStateEnums::INTERNAL);
 
 
   return true;
   return true;
 }
 }

+ 27 - 25
Source/cmake.cxx

@@ -315,7 +315,7 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
         }
         }
       }
       }
       std::string var, value;
       std::string var, value;
-      cmState::CacheEntryType type = cmState::UNINITIALIZED;
+      cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED;
       if (cmState::ParseCacheEntry(entry, var, value, type)) {
       if (cmState::ParseCacheEntry(entry, var, value, type)) {
         // The value is transformed if it is a filepath for example, so
         // The value is transformed if it is a filepath for example, so
         // we can't compare whether the value is already in the cache until
         // we can't compare whether the value is already in the cache until
@@ -410,8 +410,8 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
       std::vector<std::string> cacheKeys = this->State->GetCacheEntryKeys();
       std::vector<std::string> cacheKeys = this->State->GetCacheEntryKeys();
       for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
       for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
            it != cacheKeys.end(); ++it) {
            it != cacheKeys.end(); ++it) {
-        cmState::CacheEntryType t = this->State->GetCacheEntryType(*it);
-        if (t != cmState::STATIC) {
+        cmStateEnums::CacheEntryType t = this->State->GetCacheEntryType(*it);
+        if (t != cmStateEnums::STATIC) {
           if (regex.find(it->c_str())) {
           if (regex.find(it->c_str())) {
             entriesToDelete.push_back(*it);
             entriesToDelete.push_back(*it);
           }
           }
@@ -859,14 +859,14 @@ int cmake::AddCMakePaths()
   // Save the value in the cache
   // Save the value in the cache
   this->AddCacheEntry("CMAKE_COMMAND",
   this->AddCacheEntry("CMAKE_COMMAND",
                       cmSystemTools::GetCMakeCommand().c_str(),
                       cmSystemTools::GetCMakeCommand().c_str(),
-                      "Path to CMake executable.", cmState::INTERNAL);
+                      "Path to CMake executable.", cmStateEnums::INTERNAL);
 #ifdef CMAKE_BUILD_WITH_CMAKE
 #ifdef CMAKE_BUILD_WITH_CMAKE
-  this->AddCacheEntry("CMAKE_CTEST_COMMAND",
-                      cmSystemTools::GetCTestCommand().c_str(),
-                      "Path to ctest program executable.", cmState::INTERNAL);
-  this->AddCacheEntry("CMAKE_CPACK_COMMAND",
-                      cmSystemTools::GetCPackCommand().c_str(),
-                      "Path to cpack program executable.", cmState::INTERNAL);
+  this->AddCacheEntry(
+    "CMAKE_CTEST_COMMAND", cmSystemTools::GetCTestCommand().c_str(),
+    "Path to ctest program executable.", cmStateEnums::INTERNAL);
+  this->AddCacheEntry(
+    "CMAKE_CPACK_COMMAND", cmSystemTools::GetCPackCommand().c_str(),
+    "Path to cpack program executable.", cmStateEnums::INTERNAL);
 #endif
 #endif
   if (!cmSystemTools::FileExists(
   if (!cmSystemTools::FileExists(
         (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake").c_str())) {
         (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake").c_str())) {
@@ -879,7 +879,7 @@ int cmake::AddCMakePaths()
     return 0;
     return 0;
   }
   }
   this->AddCacheEntry("CMAKE_ROOT", cmSystemTools::GetCMakeRoot().c_str(),
   this->AddCacheEntry("CMAKE_ROOT", cmSystemTools::GetCMakeRoot().c_str(),
-                      "Path to CMake installation.", cmState::INTERNAL);
+                      "Path to CMake installation.", cmStateEnums::INTERNAL);
 
 
   return 1;
   return 1;
 }
 }
@@ -1147,7 +1147,7 @@ struct SaveCacheEntry
   std::string key;
   std::string key;
   std::string value;
   std::string value;
   std::string help;
   std::string help;
-  cmState::CacheEntryType type;
+  cmStateEnums::CacheEntryType type;
 };
 };
 
 
 int cmake::HandleDeleteCacheVariables(const std::string& var)
 int cmake::HandleDeleteCacheVariables(const std::string& var)
@@ -1291,7 +1291,7 @@ int cmake::ActualConfigure()
       "CMAKE_HOME_DIRECTORY", this->GetHomeDirectory(),
       "CMAKE_HOME_DIRECTORY", this->GetHomeDirectory(),
       "Source directory with the top level CMakeLists.txt file for this "
       "Source directory with the top level CMakeLists.txt file for this "
       "project",
       "project",
-      cmState::INTERNAL);
+      cmStateEnums::INTERNAL);
   }
   }
 
 
   // no generator specified on the command line
   // no generator specified on the command line
@@ -1338,11 +1338,11 @@ int cmake::ActualConfigure()
   if (!this->State->GetInitializedCacheValue("CMAKE_GENERATOR")) {
   if (!this->State->GetInitializedCacheValue("CMAKE_GENERATOR")) {
     this->AddCacheEntry("CMAKE_GENERATOR",
     this->AddCacheEntry("CMAKE_GENERATOR",
                         this->GlobalGenerator->GetName().c_str(),
                         this->GlobalGenerator->GetName().c_str(),
-                        "Name of generator.", cmState::INTERNAL);
+                        "Name of generator.", cmStateEnums::INTERNAL);
     this->AddCacheEntry("CMAKE_EXTRA_GENERATOR",
     this->AddCacheEntry("CMAKE_EXTRA_GENERATOR",
                         this->GlobalGenerator->GetExtraGeneratorName().c_str(),
                         this->GlobalGenerator->GetExtraGeneratorName().c_str(),
                         "Name of external makefile project generator.",
                         "Name of external makefile project generator.",
-                        cmState::INTERNAL);
+                        cmStateEnums::INTERNAL);
   }
   }
 
 
   if (const char* platformName =
   if (const char* platformName =
@@ -1362,7 +1362,7 @@ int cmake::ActualConfigure()
   } else {
   } else {
     this->AddCacheEntry("CMAKE_GENERATOR_PLATFORM",
     this->AddCacheEntry("CMAKE_GENERATOR_PLATFORM",
                         this->GeneratorPlatform.c_str(),
                         this->GeneratorPlatform.c_str(),
-                        "Name of generator platform.", cmState::INTERNAL);
+                        "Name of generator platform.", cmStateEnums::INTERNAL);
   }
   }
 
 
   if (const char* tsName =
   if (const char* tsName =
@@ -1382,7 +1382,7 @@ int cmake::ActualConfigure()
   } else {
   } else {
     this->AddCacheEntry("CMAKE_GENERATOR_TOOLSET",
     this->AddCacheEntry("CMAKE_GENERATOR_TOOLSET",
                         this->GeneratorToolset.c_str(),
                         this->GeneratorToolset.c_str(),
-                        "Name of generator toolset.", cmState::INTERNAL);
+                        "Name of generator toolset.", cmStateEnums::INTERNAL);
   }
   }
 
 
   // reset any system configuration information, except for when we are
   // reset any system configuration information, except for when we are
@@ -1411,13 +1411,14 @@ int cmake::ActualConfigure()
     if (!this->State->GetInitializedCacheValue("LIBRARY_OUTPUT_PATH")) {
     if (!this->State->GetInitializedCacheValue("LIBRARY_OUTPUT_PATH")) {
       this->AddCacheEntry(
       this->AddCacheEntry(
         "LIBRARY_OUTPUT_PATH", "",
         "LIBRARY_OUTPUT_PATH", "",
-        "Single output directory for building all libraries.", cmState::PATH);
+        "Single output directory for building all libraries.",
+        cmStateEnums::PATH);
     }
     }
     if (!this->State->GetInitializedCacheValue("EXECUTABLE_OUTPUT_PATH")) {
     if (!this->State->GetInitializedCacheValue("EXECUTABLE_OUTPUT_PATH")) {
       this->AddCacheEntry(
       this->AddCacheEntry(
         "EXECUTABLE_OUTPUT_PATH", "",
         "EXECUTABLE_OUTPUT_PATH", "",
         "Single output directory for building all executables.",
         "Single output directory for building all executables.",
-        cmState::PATH);
+        cmStateEnums::PATH);
     }
     }
   }
   }
 
 
@@ -1640,7 +1641,7 @@ void cmake::AddCacheEntry(const std::string& key, const char* value,
                           const char* helpString, int type)
                           const char* helpString, int type)
 {
 {
   this->State->AddCacheEntry(key, value, helpString,
   this->State->AddCacheEntry(key, value, helpString,
-                             cmState::CacheEntryType(type));
+                             cmStateEnums::CacheEntryType(type));
   this->UnwatchUnusedCli(key);
   this->UnwatchUnusedCli(key);
 }
 }
 
 
@@ -1694,7 +1695,8 @@ void cmake::AddDefaultGenerators()
 }
 }
 
 
 bool cmake::ParseCacheEntry(const std::string& entry, std::string& var,
 bool cmake::ParseCacheEntry(const std::string& entry, std::string& var,
-                            std::string& value, cmState::CacheEntryType& type)
+                            std::string& value,
+                            cmStateEnums::CacheEntryType& type)
 {
 {
   return cmState::ParseCacheEntry(entry, var, value, type);
   return cmState::ParseCacheEntry(entry, var, value, type);
 }
 }
@@ -2464,7 +2466,7 @@ void cmake::SetSuppressDevWarnings(bool b)
   this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", value.c_str(),
   this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", value.c_str(),
                       "Suppress Warnings that are meant for"
                       "Suppress Warnings that are meant for"
                       " the author of the CMakeLists.txt files.",
                       " the author of the CMakeLists.txt files.",
-                      cmState::INTERNAL);
+                      cmStateEnums::INTERNAL);
 }
 }
 
 
 bool cmake::GetSuppressDeprecatedWarnings() const
 bool cmake::GetSuppressDeprecatedWarnings() const
@@ -2488,7 +2490,7 @@ void cmake::SetSuppressDeprecatedWarnings(bool b)
   this->AddCacheEntry("CMAKE_WARN_DEPRECATED", value.c_str(),
   this->AddCacheEntry("CMAKE_WARN_DEPRECATED", value.c_str(),
                       "Whether to issue warnings for deprecated "
                       "Whether to issue warnings for deprecated "
                       "functionality.",
                       "functionality.",
-                      cmState::INTERNAL);
+                      cmStateEnums::INTERNAL);
 }
 }
 
 
 bool cmake::GetDevWarningsAsErrors() const
 bool cmake::GetDevWarningsAsErrors() const
@@ -2512,7 +2514,7 @@ void cmake::SetDevWarningsAsErrors(bool b)
   this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_ERRORS", value.c_str(),
   this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_ERRORS", value.c_str(),
                       "Suppress errors that are meant for"
                       "Suppress errors that are meant for"
                       " the author of the CMakeLists.txt files.",
                       " the author of the CMakeLists.txt files.",
-                      cmState::INTERNAL);
+                      cmStateEnums::INTERNAL);
 }
 }
 
 
 bool cmake::GetDeprecatedWarningsAsErrors() const
 bool cmake::GetDeprecatedWarningsAsErrors() const
@@ -2536,5 +2538,5 @@ void cmake::SetDeprecatedWarningsAsErrors(bool b)
   this->AddCacheEntry("CMAKE_ERROR_DEPRECATED", value.c_str(),
   this->AddCacheEntry("CMAKE_ERROR_DEPRECATED", value.c_str(),
                       "Whether to issue deprecation errors for macros"
                       "Whether to issue deprecation errors for macros"
                       " and functions.",
                       " and functions.",
-                      cmState::INTERNAL);
+                      cmStateEnums::INTERNAL);
 }
 }

+ 1 - 1
Source/cmake.h

@@ -161,7 +161,7 @@ public:
   ///! Break up a line like VAR:type="value" into var, type and value
   ///! Break up a line like VAR:type="value" into var, type and value
   static bool ParseCacheEntry(const std::string& entry, std::string& var,
   static bool ParseCacheEntry(const std::string& entry, std::string& var,
                               std::string& value,
                               std::string& value,
-                              cmState::CacheEntryType& type);
+                              cmStateEnums::CacheEntryType& type);
 
 
   int LoadCache();
   int LoadCache();
   bool LoadCache(const std::string& path);
   bool LoadCache(const std::string& path);

+ 3 - 3
Source/cmakemain.cxx

@@ -292,9 +292,9 @@ int do_cmake(int ac, char const* const* av)
     std::vector<std::string> keys = cm.GetState()->GetCacheEntryKeys();
     std::vector<std::string> keys = cm.GetState()->GetCacheEntryKeys();
     for (std::vector<std::string>::const_iterator it = keys.begin();
     for (std::vector<std::string>::const_iterator it = keys.begin();
          it != keys.end(); ++it) {
          it != keys.end(); ++it) {
-      cmState::CacheEntryType t = cm.GetState()->GetCacheEntryType(*it);
-      if (t != cmState::INTERNAL && t != cmState::STATIC &&
-          t != cmState::UNINITIALIZED) {
+      cmStateEnums::CacheEntryType t = cm.GetState()->GetCacheEntryType(*it);
+      if (t != cmStateEnums::INTERNAL && t != cmStateEnums::STATIC &&
+          t != cmStateEnums::UNINITIALIZED) {
         const char* advancedProp =
         const char* advancedProp =
           cm.GetState()->GetCacheEntryProperty(*it, "ADVANCED");
           cm.GetState()->GetCacheEntryProperty(*it, "ADVANCED");
         if (list_all_cached || !advancedProp) {
         if (list_all_cached || !advancedProp) {