diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2002-02-25 21:57:09 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2002-02-25 21:57:09 (GMT) |
commit | b253a0644d6244b84e36c82f124e4a80dbdc55ee (patch) | |
tree | a886b1c93aae69b1dab2dd7dce14762ceacafb65 /Source/cmAddExecutableCommand.cxx | |
parent | b7177cec307cc156953ed0c00ed8fd19de126603 (diff) | |
download | CMake-b253a0644d6244b84e36c82f124e4a80dbdc55ee.zip CMake-b253a0644d6244b84e36c82f124e4a80dbdc55ee.tar.gz CMake-b253a0644d6244b84e36c82f124e4a80dbdc55ee.tar.bz2 |
FIX: command now expands *all* args (found through FOREACH example)
Diffstat (limited to 'Source/cmAddExecutableCommand.cxx')
-rw-r--r-- | Source/cmAddExecutableCommand.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index 0d46593..fa06269 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -32,17 +32,22 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args) m_Makefile->ExpandVariablesInString(exename); ++s; + bool use_win32 = false; + if (*s == "WIN32") { ++s; - std::vector<std::string> srclists(s, args.end()); - m_Makefile->AddExecutable(exename.c_str(),srclists, true); + use_win32 = true; } - else + + std::vector<std::string> srclists(s, args.end()); + for(std::vector<std::string>::iterator j = srclists.begin(); + j != srclists.end(); ++j) { - std::vector<std::string> 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; } |