summaryrefslogtreecommitdiffstats
path: root/Source/cmOptionCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-10 20:59:36 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-10 20:59:36 (GMT)
commitafbe0883094afddb7cbaedcb8d89031ef503ed3b (patch)
tree1d8a7b3105ae2ca0b4fa0aff6da561fb973a8c1c /Source/cmOptionCommand.cxx
parent6097c04c4d5f847dc7de1fb32f1cfd12b405db81 (diff)
downloadCMake-afbe0883094afddb7cbaedcb8d89031ef503ed3b.zip
CMake-afbe0883094afddb7cbaedcb8d89031ef503ed3b.tar.gz
CMake-afbe0883094afddb7cbaedcb8d89031ef503ed3b.tar.bz2
Remove barely-used cmMakefile::AddCacheDefinition
The boolean overload of this method was used only to implement option(). We re-implement option() in terms of the main method and removes the now-unused signature. This removes some duplicate code that had already fallen behind on changes (it was not removing the local definition instead of setting it).
Diffstat (limited to 'Source/cmOptionCommand.cxx')
-rw-r--r--Source/cmOptionCommand.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx
index 0c70411..8f2bd66 100644
--- a/Source/cmOptionCommand.cxx
+++ b/Source/cmOptionCommand.cxx
@@ -69,9 +69,7 @@ bool cmOptionCommand
{
initialValue = args[2];
}
- this->Makefile->AddCacheDefinition(args[0].c_str(),
- cmSystemTools::IsOn(initialValue.c_str()),
- args[1].c_str());
-
+ this->Makefile->AddCacheDefinition(args[0].c_str(), initialValue.c_str(),
+ args[1].c_str(), cmCacheManager::BOOL);
return true;
}