summaryrefslogtreecommitdiff
path: root/Source/cmInstallProgramsCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-03-01 12:13:38 -0500
committerBrad King <brad.king@kitware.com>2005-03-01 12:13:38 -0500
commitb636a0f20aa9f94940acd109e3717ef79730d168 (patch)
treedf2d377a2ed0c3b053384bdd477f14b1ff842499 /Source/cmInstallProgramsCommand.cxx
parent717927d6d2f8ef4ad1a5a960adc8c80aa1b7e44a (diff)
downloadcmake-b636a0f20aa9f94940acd109e3717ef79730d168.tar.gz
BUG: Added FILES mode to INSTALL_PROGRAMS command to make the single argument case unambiguous.
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 e1645c7bcc..0489a74c4a 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()));