Commit 58a1cf7a authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

adding xacc.unsetOption


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent f4ae990e
...@@ -173,6 +173,12 @@ void setOption(const std::string& optionKey, const std::string& value) { ...@@ -173,6 +173,12 @@ void setOption(const std::string& optionKey, const std::string& value) {
RuntimeOptions::instance()->insert(std::make_pair(optionKey, value)); RuntimeOptions::instance()->insert(std::make_pair(optionKey, value));
} }
} }
void unsetOption(const std::string& optionKey) {
if (!optionExists(optionKey)) {
error("Invalid runtime option - " + optionKey);
}
(*RuntimeOptions::instance()).erase(optionKey);
}
void setCompiler(const std::string& compilerName) { void setCompiler(const std::string& compilerName) {
setOption("compiler", compilerName); setOption("compiler", compilerName);
......
...@@ -168,6 +168,8 @@ const std::string getOption(const std::string& optionKey); ...@@ -168,6 +168,8 @@ const std::string getOption(const std::string& optionKey);
*/ */
void setOption(const std::string& optionKey, const std::string& value); void setOption(const std::string& optionKey, const std::string& value);
void unsetOption(const std::string& optionKey);
/** /**
* Set the Compiler to use. * Set the Compiler to use.
* *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment