diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2001-11-08 14:16:32 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2001-11-08 14:16:32 (GMT) |
commit | 229b9064d1931b8b68b737ce13df5a4af3b53712 (patch) | |
tree | abe5c914803053535d4bf2194f0c81181a5f7fa4 /Source/cmAddDependenciesCommand.cxx | |
parent | 32e9510d55dd28d3a3547c90a03e56a2ba390579 (diff) | |
download | CMake-229b9064d1931b8b68b737ce13df5a4af3b53712.zip CMake-229b9064d1931b8b68b737ce13df5a4af3b53712.tar.gz CMake-229b9064d1931b8b68b737ce13df5a4af3b53712.tar.bz2 |
Expand variables in all target args
Diffstat (limited to 'Source/cmAddDependenciesCommand.cxx')
-rw-r--r-- | Source/cmAddDependenciesCommand.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmAddDependenciesCommand.cxx b/Source/cmAddDependenciesCommand.cxx index 11dcc95..5b2cc6e 100644 --- a/Source/cmAddDependenciesCommand.cxx +++ b/Source/cmAddDependenciesCommand.cxx @@ -50,14 +50,20 @@ bool cmAddDependenciesCommand::InitialPass(std::vector<std::string> const& args) return false; } + std::string target_name = args[0]; + m_Makefile->ExpandVariablesInString(target_name); + cmTargets &tgts = m_Makefile->GetTargets(); - if (tgts.find(args[0]) != tgts.end()) + if (tgts.find(target_name) != tgts.end()) { std::vector<std::string>::const_iterator s = args.begin(); ++s; + std::string depend_target; for (; s != args.end(); ++s) { - tgts[args[0]].AddUtility(s->c_str()); + depend_target = *s; + m_Makefile->ExpandVariablesInString(depend_target); + tgts[target_name].AddUtility(depend_target.c_str()); } } |