diff options
author | Brad King <brad.king@kitware.com> | 2005-03-01 17:13:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-03-01 17:13:38 (GMT) |
commit | b636a0f20aa9f94940acd109e3717ef79730d168 (patch) | |
tree | df2d377a2ed0c3b053384bdd477f14b1ff842499 /Source/cmInstallProgramsCommand.cxx | |
parent | 717927d6d2f8ef4ad1a5a960adc8c80aa1b7e44a (diff) | |
download | CMake-b636a0f20aa9f94940acd109e3717ef79730d168.zip CMake-b636a0f20aa9f94940acd109e3717ef79730d168.tar.gz CMake-b636a0f20aa9f94940acd109e3717ef79730d168.tar.bz2 |
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.cxx | 17 |
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())); |