From b253a0644d6244b84e36c82f124e4a80dbdc55ee Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Mon, 25 Feb 2002 16:57:09 -0500 Subject: [PATCH] FIX: command now expands *all* args (found through FOREACH example) --- Source/cmAddExecutableCommand.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index 0d46593dc..fa062696b 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -32,17 +32,22 @@ bool cmAddExecutableCommand::InitialPass(std::vector const& args) m_Makefile->ExpandVariablesInString(exename); ++s; + bool use_win32 = false; + if (*s == "WIN32") { ++s; - std::vector srclists(s, args.end()); - m_Makefile->AddExecutable(exename.c_str(),srclists, true); + use_win32 = true; } - else + + std::vector srclists(s, args.end()); + for(std::vector::iterator j = srclists.begin(); + j != srclists.end(); ++j) { - std::vector srclists(s, args.end()); - m_Makefile->AddExecutable(exename.c_str(),srclists, false); + m_Makefile->ExpandVariablesInString(*j); } + + m_Makefile->AddExecutable(exename.c_str(), srclists, use_win32); return true; }