summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallFilesGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-05 15:31:57 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-05 15:31:57 (GMT)
commit934c804ea44236baa59369cd28b018430d1b5b1d (patch)
treed458bbefcd53727690ad2dc9bde9eccc07269bc1 /Source/cmInstallFilesGenerator.cxx
parent16b781360c5d1f0264047596711d11dcb5b768a9 (diff)
downloadCMake-934c804ea44236baa59369cd28b018430d1b5b1d.zip
CMake-934c804ea44236baa59369cd28b018430d1b5b1d.tar.gz
CMake-934c804ea44236baa59369cd28b018430d1b5b1d.tar.bz2
ENH: Added OPTIONAL option to INSTALL command to allow installation of files if they exist while ignoring them otherwise. This addresses bug#2922.
Diffstat (limited to 'Source/cmInstallFilesGenerator.cxx')
-rw-r--r--Source/cmInstallFilesGenerator.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx
index fd857a5..075285c 100644
--- a/Source/cmInstallFilesGenerator.cxx
+++ b/Source/cmInstallFilesGenerator.cxx
@@ -25,10 +25,11 @@ cmInstallFilesGenerator
const char* file_permissions,
std::vector<std::string> const& configurations,
const char* component,
- const char* rename):
+ const char* rename,
+ bool optional):
Files(files), Destination(dest), Programs(programs),
FilePermissions(file_permissions), Configurations(configurations),
- Component(component), Rename(rename)
+ Component(component), Rename(rename), Optional(optional)
{
}
@@ -45,14 +46,13 @@ void cmInstallFilesGenerator::GenerateScript(std::ostream& os)
for(std::vector<std::string>::const_iterator fi = this->Files.begin();
fi != this->Files.end(); ++fi)
{
- bool not_optional = false;
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(),
- not_optional, no_properties,
+ this->Optional, no_properties,
this->FilePermissions.c_str(), no_dir_permissions,
this->Configurations,
this->Component.c_str(),