diff options
author | Ken Martin <ken.martin@kitware.com> | 2001-04-26 19:41:18 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2001-04-26 19:41:18 (GMT) |
commit | 888e47ddb4215659e76673af4f18aba865ccc4b8 (patch) | |
tree | 7cdf2d88a1430103a88ee075e22c2540801b9692 /Source | |
parent | 61d23149893dcba75115486187a39ce853e091b9 (diff) | |
download | CMake-888e47ddb4215659e76673af4f18aba865ccc4b8.zip CMake-888e47ddb4215659e76673af4f18aba865ccc4b8.tar.gz CMake-888e47ddb4215659e76673af4f18aba865ccc4b8.tar.bz2 |
better help
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmOptionCommand.cxx | 9 | ||||
-rw-r--r-- | Source/cmOptionCommand.h | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 3b7b34c..1aac60a 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -18,7 +18,7 @@ // cmOptionCommand bool cmOptionCommand::Invoke(std::vector<std::string>& args) { - if(args.size() < 1) + if(args.size() < 2) { this->SetError("called with incorrect number of arguments"); return false; @@ -32,12 +32,15 @@ bool cmOptionCommand::Invoke(std::vector<std::string>& args) { cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(), false, - "Option command"); - m_Makefile->AddDefinition(args[0].c_str(), "0"); + args[1].c_str()); + m_Makefile->AddDefinition(args[0].c_str(), "Off"); } else { m_Makefile->AddDefinition(args[0].c_str(), cacheValue); + cmCacheManager::GetInstance()-> + AddCacheEntry(args[0].c_str(), + cmSystemTools::IsOn(cacheValue), args[1].c_str()); } return true; diff --git a/Source/cmOptionCommand.h b/Source/cmOptionCommand.h index bb1bcb7..716d9bf 100644 --- a/Source/cmOptionCommand.h +++ b/Source/cmOptionCommand.h @@ -66,7 +66,7 @@ public: virtual const char* GetFullDocumentation() { return - "OPTION(USE_MPI)\n" + "OPTION(USE_MPI \"help string decribing the option\")\n" "Provide an option for the user to select"; } |