summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-24 15:40:26 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-24 17:18:20 (GMT)
commitd19b64d671e9f1e706218bd0acc6a727e7114158 (patch)
tree80d62ad1ce7000c1adb185e90b45794257828bef /Source/cmInstallCommand.cxx
parentc9568de52c4e11c04a9f758ea9ecc1e72ea7cbfb (diff)
downloadCMake-d19b64d671e9f1e706218bd0acc6a727e7114158.zip
CMake-d19b64d671e9f1e706218bd0acc6a727e7114158.tar.gz
CMake-d19b64d671e9f1e706218bd0acc6a727e7114158.tar.bz2
install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761)
Installing large directories, e.g., the output of a doxygen run, prints one line per file resulting in too much noise in the build output. Add an option to the install(DIRECTORY) command to not print anything upon make install. Extend the RunCMake.install test with cases covering MESSAGE_NEVER behavior of the install(DIRECTORY) command. Suggested-by: Stefan Eilemann <Stefan.Eilemann@epfl.ch>
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index f4af460..ec500d9 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -917,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;
@@ -955,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.
@@ -1215,7 +1231,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
}
cmInstallGenerator::MessageLevel message =
- cmInstallGenerator::SelectMessageLevel(this->Makefile);
+ cmInstallGenerator::SelectMessageLevel(this->Makefile, message_never);
// Create the directory install generator.
this->Makefile->AddInstallGenerator(