better help
This commit is contained in:
parent
61d2314989
commit
888e47ddb4
|
@ -18,7 +18,7 @@
|
||||||
// cmOptionCommand
|
// cmOptionCommand
|
||||||
bool cmOptionCommand::Invoke(std::vector<std::string>& args)
|
bool cmOptionCommand::Invoke(std::vector<std::string>& args)
|
||||||
{
|
{
|
||||||
if(args.size() < 1)
|
if(args.size() < 2)
|
||||||
{
|
{
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
|
@ -32,12 +32,15 @@ bool cmOptionCommand::Invoke(std::vector<std::string>& args)
|
||||||
{
|
{
|
||||||
cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(),
|
cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(),
|
||||||
false,
|
false,
|
||||||
"Option command");
|
args[1].c_str());
|
||||||
m_Makefile->AddDefinition(args[0].c_str(), "0");
|
m_Makefile->AddDefinition(args[0].c_str(), "Off");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_Makefile->AddDefinition(args[0].c_str(), cacheValue);
|
m_Makefile->AddDefinition(args[0].c_str(), cacheValue);
|
||||||
|
cmCacheManager::GetInstance()->
|
||||||
|
AddCacheEntry(args[0].c_str(),
|
||||||
|
cmSystemTools::IsOn(cacheValue), args[1].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -66,7 +66,7 @@ public:
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"OPTION(USE_MPI)\n"
|
"OPTION(USE_MPI \"help string decribing the option\")\n"
|
||||||
"Provide an option for the user to select";
|
"Provide an option for the user to select";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue