diff options
author | Ken Martin <ken.martin@kitware.com> | 2001-06-26 17:23:55 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2001-06-26 17:23:55 (GMT) |
commit | c84f6448a64a960c4bf7fb59e313b8afaea3c4e9 (patch) | |
tree | faf584a2d259a62a8f0681ebbcf845b612ecf300 /Source/cmAddCustomTargetCommand.cxx | |
parent | 43ac1a3a86193fa72795e98e2d51d3f48209082b (diff) | |
download | CMake-c84f6448a64a960c4bf7fb59e313b8afaea3c4e9.zip CMake-c84f6448a64a960c4bf7fb59e313b8afaea3c4e9.tar.gz CMake-c84f6448a64a960c4bf7fb59e313b8afaea3c4e9.tar.bz2 |
modified how paths are escaped, added depends
Diffstat (limited to 'Source/cmAddCustomTargetCommand.cxx')
-rw-r--r-- | Source/cmAddCustomTargetCommand.cxx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index 3f9a65d..6320ba6 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -51,18 +51,27 @@ bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string>& args) return false; } m_Makefile->ExpandVariablesInString(args[0]); - m_Makefile->ExpandVariablesInString(args[1]); - // all target option + // all target option + std::string result; + std::vector<std::string>::iterator s = args.begin(); + ++s; if (args.size() >= 3) { - if (args[2] == "ALL") + if (args[1] == "ALL") { all = true; + ++s; } } + for (;s != args.end(); ++s) + { + m_Makefile->ExpandVariablesInString(*s); + result += cmSystemTools::EscapeSpaces(s->c_str()); + result += " "; + } m_Makefile->AddUtilityCommand(args[0].c_str(), - args[1].c_str(), all); + result.c_str(), all); return true; } |