summaryrefslogtreecommitdiffstats
path: root/Source/cmAddExecutableCommand.cxx
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2002-02-25 21:57:09 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2002-02-25 21:57:09 (GMT)
commitb253a0644d6244b84e36c82f124e4a80dbdc55ee (patch)
treea886b1c93aae69b1dab2dd7dce14762ceacafb65 /Source/cmAddExecutableCommand.cxx
parentb7177cec307cc156953ed0c00ed8fd19de126603 (diff)
downloadCMake-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.cxx15
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;
}