diff options
author | Brad King <brad.king@kitware.com> | 2009-02-24 11:41:40 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-24 11:41:40 -0500 |
commit | 1595b8e69eac0d2dbab6ac29663a85d8d486a5cc (patch) | |
tree | ded9bc2ffe1ee4ca3adb4f19a24534877d908b85 /Source/cmInstallDirectoryGenerator.cxx | |
parent | a79f8cd4c156b01ef0305a30a9c0ca2dcbf9a1cc (diff) | |
download | cmake-1595b8e69eac0d2dbab6ac29663a85d8d486a5cc.tar.gz |
ENH: Add install(DIRECTORY) option 'OPTIONAL'
This adds the OPTIONAL option to the install(DIRECTORY) command. It
tells the installation rule that it is not an error if the source
directory does not exist. See issue #8394.
Diffstat (limited to 'Source/cmInstallDirectoryGenerator.cxx')
-rw-r--r-- | Source/cmInstallDirectoryGenerator.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx index 110e6b6284..6f46d297f6 100644 --- a/Source/cmInstallDirectoryGenerator.cxx +++ b/Source/cmInstallDirectoryGenerator.cxx @@ -26,10 +26,11 @@ cmInstallDirectoryGenerator const char* dir_permissions, std::vector<std::string> const& configurations, const char* component, - const char* literal_args): + const char* literal_args, + bool optional): cmInstallGenerator(dest, configurations, component), Directories(dirs), FilePermissions(file_permissions), DirPermissions(dir_permissions), - LiteralArguments(literal_args) + LiteralArguments(literal_args), Optional(optional) { } @@ -45,12 +46,11 @@ cmInstallDirectoryGenerator::GenerateScriptActions(std::ostream& os, Indent const& indent) { // Write code to install the directories. - bool not_optional = false; const char* no_properties = 0; const char* no_rename = 0; this->AddInstallRule(os, cmTarget::INSTALL_DIRECTORY, this->Directories, - not_optional, no_properties, + this->Optional, no_properties, this->FilePermissions.c_str(), this->DirPermissions.c_str(), no_rename, this->LiteralArguments.c_str(), |