summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmOptionCommand.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx
index 5bd66a518e..b4e57a1571 100644
--- a/Source/cmOptionCommand.cxx
+++ b/Source/cmOptionCommand.cxx
@@ -70,7 +70,8 @@ bool cmOptionCommand
{
initialValue = args[2];
}
- this->Makefile->AddCacheDefinition(args[0].c_str(), initialValue.c_str(),
+ bool init = cmSystemTools::IsOn(initialValue.c_str());
+ this->Makefile->AddCacheDefinition(args[0].c_str(), init? "ON":"OFF",
args[1].c_str(), cmCacheManager::BOOL);
return true;
}