diff options
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r-- | Source/cmInstallCommand.cxx | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 0041122..ec500d9 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -25,9 +25,12 @@ static cmInstallTargetGenerator* CreateInstallTargetGenerator(cmTarget& target, const cmInstallCommandArguments& args, bool impLib, bool forceOpt = false) { + cmInstallGenerator::MessageLevel message = + cmInstallGenerator::SelectMessageLevel(target.GetMakefile()); return new cmInstallTargetGenerator(target, args.GetDestination().c_str(), impLib, args.GetPermissions().c_str(), args.GetConfigurations(), args.GetComponent().c_str(), + message, args.GetOptional() || forceOpt); } @@ -36,10 +39,13 @@ static cmInstallFilesGenerator* CreateInstallFilesGenerator( const std::vector<std::string>& absFiles, const cmInstallCommandArguments& args, bool programs) { + cmInstallGenerator::MessageLevel message = + cmInstallGenerator::SelectMessageLevel(mf); return new cmInstallFilesGenerator(mf, absFiles, args.GetDestination().c_str(), programs, args.GetPermissions().c_str(), args.GetConfigurations(), args.GetComponent().c_str(), + message, args.GetRename().c_str(), args.GetOptional()); } @@ -911,6 +917,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) Doing doing = DoingDirs; bool in_match_mode = false; bool optional = false; + bool message_never = false; std::vector<std::string> dirs; const char* destination = 0; std::string permissions_file; @@ -949,6 +956,21 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) optional = true; doing = DoingNone; } + else if(args[i] == "MESSAGE_NEVER") + { + if(in_match_mode) + { + cmOStringStream e; + e << args[0] << " does not allow \"" + << args[i] << "\" after PATTERN or REGEX."; + this->SetError(e.str()); + return false; + } + + // Mark the rule as quiet. + message_never = true; + doing = DoingNone; + } else if(args[i] == "PATTERN") { // Switch to a new pattern match rule. @@ -1208,6 +1230,9 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) return false; } + cmInstallGenerator::MessageLevel message = + cmInstallGenerator::SelectMessageLevel(this->Makefile, message_never); + // Create the directory install generator. this->Makefile->AddInstallGenerator( new cmInstallDirectoryGenerator(dirs, destination, @@ -1215,6 +1240,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) permissions_dir.c_str(), configurations, component.c_str(), + message, literal_args.c_str(), optional)); @@ -1333,13 +1359,16 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args) } } + cmInstallGenerator::MessageLevel message = + cmInstallGenerator::SelectMessageLevel(this->Makefile); + // Create the export install generator. cmInstallExportGenerator* exportGenerator = new cmInstallExportGenerator( exportSet, ica.GetDestination().c_str(), ica.GetPermissions().c_str(), ica.GetConfigurations(), - ica.GetComponent().c_str(), fname.c_str(), + ica.GetComponent().c_str(), message, fname.c_str(), name_space.GetCString(), exportOld.IsEnabled(), this->Makefile); this->Makefile->AddInstallGenerator(exportGenerator); |