summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CTest/cmCTestGenericHandler.cxx30
-rw-r--r--Source/CTest/cmCTestGenericHandler.h6
2 files changed, 36 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx
index 9ae2ff7..0fa6d07 100644
--- a/Source/CTest/cmCTestGenericHandler.cxx
+++ b/Source/CTest/cmCTestGenericHandler.cxx
@@ -27,4 +27,34 @@ cmCTestGenericHandler::~cmCTestGenericHandler()
{
}
+void cmCTestGenericHandler::SetOption(const char* op, const char* value)
+{
+ if ( !op )
+ {
+ return;
+ }
+ if ( !value )
+ {
+ cmCTestGenericHandler::t_StringToString::iterator remit
+ = m_Options.find(op);
+ if ( remit != m_Options.end() )
+ {
+ m_Options.erase(remit);
+ }
+ return;
+ }
+
+ m_Options[op] = value;
+}
+
+const char* cmCTestGenericHandler::GetOption(const char* op)
+{
+ cmCTestGenericHandler::t_StringToString::iterator remit
+ = m_Options.find(op);
+ if ( remit == m_Options.end() )
+ {
+ return 0;
+ }
+ return remit->second.c_str();
+}
diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h
index 26fdc02..a40974c 100644
--- a/Source/CTest/cmCTestGenericHandler.h
+++ b/Source/CTest/cmCTestGenericHandler.h
@@ -58,9 +58,15 @@ public:
cmCTestGenericHandler();
virtual ~cmCTestGenericHandler();
+ typedef std::map<cmStdString,cmStdString> t_StringToString;
+
+ void SetOption(const char* op, const char* value);
+ const char* GetOption(const char* op);
+
protected:
bool m_Verbose;
cmCTest *m_CTest;
+ t_StringToString m_Options;
};
#endif