summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallProgramsCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmInstallProgramsCommand.cxx')
-rw-r--r--Source/cmInstallProgramsCommand.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx
index e1645c7..0489a74 100644
--- a/Source/cmInstallProgramsCommand.cxx
+++ b/Source/cmInstallProgramsCommand.cxx
@@ -45,13 +45,24 @@ void cmInstallProgramsCommand::FinalPass()
{
std::vector<std::string>& targetSourceLists =
m_Makefile->GetTargets()[m_TargetName].GetSourceLists();
+
+ bool files_mode = false;
+ if(!m_FinalArgs.empty() && m_FinalArgs[0] == "FILES")
+ {
+ files_mode = true;
+ }
// two different options
- if (m_FinalArgs.size() > 1)
+ if (m_FinalArgs.size() > 1 || files_mode)
{
// for each argument, get the programs
- for (std::vector<std::string>::iterator s = m_FinalArgs.begin();
- s != m_FinalArgs.end(); ++s)
+ std::vector<std::string>::iterator s = m_FinalArgs.begin();
+ if(files_mode)
+ {
+ // Skip the FILES argument in files mode.
+ ++s;
+ }
+ for(;s != m_FinalArgs.end(); ++s)
{
// add to the result
targetSourceLists.push_back(this->FindInstallSource(s->c_str()));