Browse Source

VS: Add method to clear flag tables of option parser

Brad King 8 years ago
parent
commit
a05fc93ee6

+ 7 - 0
Source/cmVisualStudioGeneratorOptions.cxx

@@ -81,6 +81,13 @@ void cmVisualStudioGeneratorOptions::AddTable(cmVS7FlagTable const* table)
   }
 }
 
+void cmVisualStudioGeneratorOptions::ClearTables()
+{
+  for (int i = 0; i < FlagTableCount; ++i) {
+    this->FlagTable[i] = CM_NULLPTR;
+  }
+}
+
 void cmVisualStudioGeneratorOptions::FixExceptionHandlingDefault()
 {
   // Exception handling is on by default because the platform file has

+ 3 - 0
Source/cmVisualStudioGeneratorOptions.h

@@ -43,6 +43,9 @@ public:
   // Add a table of flags.
   void AddTable(cmVS7FlagTable const* table);
 
+  // Clear the flag tables.
+  void ClearTables();
+
   // Store options from command line flags.
   void Parse(const char* flags);
   void ParseFinish();