diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-04 15:30:46 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-04 15:30:46 (GMT) |
commit | de10cfc72e51094d3a8f3a8d10f09a902330a2f3 (patch) | |
tree | 19175a07cd503bb427d1f394dc9a7d555b28246f /Source/cmOptionCommand.cxx | |
parent | 33e1a4a09aaedfcb869e2f4217815e09f0d3187f (diff) | |
download | CMake-de10cfc72e51094d3a8f3a8d10f09a902330a2f3.zip CMake-de10cfc72e51094d3a8f3a8d10f09a902330a2f3.tar.gz CMake-de10cfc72e51094d3a8f3a8d10f09a902330a2f3.tar.bz2 |
ENH: move testing stuff to cmake from configure, good bye dashboard... :)
Diffstat (limited to 'Source/cmOptionCommand.cxx')
-rw-r--r-- | Source/cmOptionCommand.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 954762e..4564f02 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -55,10 +55,15 @@ bool cmOptionCommand::Invoke(std::vector<std::string>& args) = cmCacheManager::GetInstance()->GetCacheValue(args[0].c_str()); if(!cacheValue) { + const char* initialValue = "Off"; + if(args.size() == 3) + { + initialValue = args[2].c_str(); + } cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(), - false, + cmSystemTools::IsOn(initialValue), args[1].c_str()); - m_Makefile->AddDefinition(args[0].c_str(), "Off"); + m_Makefile->AddDefinition(args[0].c_str(), initialValue); } else { |