diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2001-08-19 23:11:59 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2001-08-19 23:11:59 (GMT) |
commit | edc738173b8a50e65557ea0fc237a3432621aa3a (patch) | |
tree | 3adbfa4575440b69230695468a4704d22495fcef /Source | |
parent | afba0450282eeb90c31ba92c5182e5570bd85517 (diff) | |
download | CMake-edc738173b8a50e65557ea0fc237a3432621aa3a.zip CMake-edc738173b8a50e65557ea0fc237a3432621aa3a.tar.gz CMake-edc738173b8a50e65557ea0fc237a3432621aa3a.tar.bz2 |
Allow option value to be expanded (thus, we can use the value of another option as default)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmOptionCommand.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index db3c007..3e167de 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -55,13 +55,14 @@ bool cmOptionCommand::InitialPass(std::vector<std::string>& args) = m_Makefile->GetDefinition(args[0].c_str()); if(!cacheValue) { - const char* initialValue = "Off"; + std::string initialValue = "Off"; if(args.size() == 3) { - initialValue = args[2].c_str(); + initialValue = args[2]; + m_Makefile->ExpandVariablesInString(initialValue); } m_Makefile->AddCacheDefinition(args[0].c_str(), - cmSystemTools::IsOn(initialValue), + cmSystemTools::IsOn(initialValue.c_str()), args[1].c_str()); } else |