summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestGenericHandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestGenericHandler.cxx')
-rw-r--r--Source/CTest/cmCTestGenericHandler.cxx30
1 files changed, 30 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();
+}