summaryrefslogtreecommitdiff
path: root/Source/cmInstallFilesGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-06-28 16:11:18 -0400
committerBrad King <brad.king@kitware.com>2007-06-28 16:11:18 -0400
commitfdf7b203af156f08bf149b35d0b54573d4b25abf (patch)
treed73c95726631536288f9efd46a704f2d5b11b3c8 /Source/cmInstallFilesGenerator.cxx
parent33e9becd6f1a8343d347611c2037bd980ea41690 (diff)
downloadcmake-fdf7b203af156f08bf149b35d0b54573d4b25abf.tar.gz
ENH: First step of install script generator cleanup. Each configuration to be installed is now separately handled instead of using variables to store per-configuration names. For targets the component and configuration install-time tests are now done in the install script instead of in the FILE(INSTALL) command. This cleans things up like not trying to strip a file that was optionally not installed. It also simplifies the code for install_name adjustment on OSX. This commit is surrounded by the tags CMake-InstallGeneratorCleanup1-pre and CMake-InstallGeneratorCleanup1-post.
Diffstat (limited to 'Source/cmInstallFilesGenerator.cxx')
-rw-r--r--Source/cmInstallFilesGenerator.cxx27
1 files changed, 12 insertions, 15 deletions
diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx
index 76cdaa5277..d487aba3db 100644
--- a/Source/cmInstallFilesGenerator.cxx
+++ b/Source/cmInstallFilesGenerator.cxx
@@ -43,19 +43,16 @@ cmInstallFilesGenerator
void cmInstallFilesGenerator::GenerateScript(std::ostream& os)
{
// Write code to install the files.
- for(std::vector<std::string>::const_iterator fi = this->Files.begin();
- fi != this->Files.end(); ++fi)
- {
- const char* no_properties = 0;
- const char* no_dir_permissions = 0;
- this->AddInstallRule(os, this->Destination.c_str(),
- (this->Programs
- ? cmTarget::INSTALL_PROGRAMS
- : cmTarget::INSTALL_FILES), fi->c_str(),
- this->Optional, no_properties,
- this->FilePermissions.c_str(), no_dir_permissions,
- this->Configurations,
- this->Component.c_str(),
- this->Rename.c_str());
- }
+ const char* no_properties = 0;
+ const char* no_dir_permissions = 0;
+ this->AddInstallRule(os, this->Destination.c_str(),
+ (this->Programs
+ ? cmTarget::INSTALL_PROGRAMS
+ : cmTarget::INSTALL_FILES),
+ this->Files,
+ this->Optional, no_properties,
+ this->FilePermissions.c_str(), no_dir_permissions,
+ this->Configurations,
+ this->Component.c_str(),
+ this->Rename.c_str());
}