diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-05 23:41:24 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-05 23:41:24 (GMT) |
commit | 4651dbcfc64836988649c2ca7e3e30c811723eb2 (patch) | |
tree | 78393201554f92b9e59bc8c5893f6e28a2ab2dbb /Source/cmAddCustomTargetCommand.cxx | |
parent | 2b9140f6b512784f65dfa58ff1b9076fd6f9227d (diff) | |
download | CMake-4651dbcfc64836988649c2ca7e3e30c811723eb2.zip CMake-4651dbcfc64836988649c2ca7e3e30c811723eb2.tar.gz CMake-4651dbcfc64836988649c2ca7e3e30c811723eb2.tar.bz2 |
ENH: expand variables in arguments before the commands get them
Diffstat (limited to 'Source/cmAddCustomTargetCommand.cxx')
-rw-r--r-- | Source/cmAddCustomTargetCommand.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index c7b58fc..d03d4d2 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -17,9 +17,8 @@ #include "cmAddCustomTargetCommand.h" // cmAddCustomTargetCommand -bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string> const& argsIn) +bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string> const& args) { - std::vector<std::string> args = argsIn; bool all = false; if(args.size() < 2 ) @@ -27,11 +26,10 @@ bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string> const& argsI this->SetError("called with incorrect number of arguments"); return false; } - m_Makefile->ExpandVariablesInString(args[0]); // all target option std::string arguments; - std::vector<std::string>::iterator s = args.begin(); + std::vector<std::string>::const_iterator s = args.begin(); ++s; // move past args[0] as it is already to be used if (args.size() >= 3) { @@ -44,12 +42,11 @@ bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string> const& argsI std::string command; if(s != args.end()) { - command = m_Makefile->ExpandVariablesInString(*s); + command = *s; ++s; } for (;s != args.end(); ++s) { - m_Makefile->ExpandVariablesInString(*s); arguments += cmSystemTools::EscapeSpaces(s->c_str()); arguments += " "; } |