[cmake-developers] Install quiet option
J Decker
d3ck0r at gmail.com
Fri Jun 13 17:20:22 EDT 2014
in the vein of http://www.cmake.org/Wiki/CMake_Useful_Variables
CMAKE_INSTALL_ALWAYS
patch adds CMAKE_INSTALL_QUIET
This bypasses 'Up-to-date:' on file that are up to date
and 'Installing' on directories that already exist and are directories.
There are 3 places that call 'ReportCopy' the third is when symlinks are
made; I have no way to test an appropriate modification to bypass it's
status when really no action taken.
Not sure header on diff is appropriate for applying
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140613/8e831aa5/attachment.html>
-------------- next part --------------
--- source\cmFileCommand.cxx Mon Jun 9 08:52:04 2014
+++ source\cmFileCommand.cxx.new Fri Jun 13 14:05:40 2014
@@ -964,6 +964,7 @@
UseGivenPermissionsFile(false),
UseGivenPermissionsDir(false),
UseSourcePermissions(true),
+ InstallQuiet(false),
Doing(DoingNone)
{
}
@@ -1100,6 +1101,7 @@
bool UseGivenPermissionsFile;
bool UseGivenPermissionsDir;
bool UseSourcePermissions;
+ bool InstallQuiet;
std::string Destination;
std::vector<std::string> Files;
int Doing;
@@ -1611,7 +1615,10 @@
MatchProperties const& match_properties)
{
// Inform the user about this directory installation.
- this->ReportCopy(destination, TypeDir, true);
+ if( !this->InstallQuiet
+ || !cmSystemTools::FileExists(destination)
+ || !cmSystemTools::FileIsDirectory(destination) )
+ this->ReportCopy(destination, TypeDir, true);
// Make sure the destination directory exists.
if(!cmSystemTools::MakeDirectory(destination))
@@ -1706,6 +1713,9 @@
{
// Installation does not use source permissions by default.
this->UseSourcePermissions = false;
+ // Check whether to report all directories and up-to-date-files or only those created/installed.
+ this->InstallQuiet =
+ cmSystemTools::IsOn(cmSystemTools::GetEnv("CMAKE_INSTALL_QUIET"));
// Check whether to copy files always or only if they have changed.
this->Always =
cmSystemTools::IsOn(cmSystemTools::GetEnv("CMAKE_INSTALL_ALWAYS"));
@@ -1740,7 +1750,8 @@
{
std::string message = (copy? "Installing: " : "Up-to-date: ");
message += toFile;
- this->Makefile->DisplayStatus(message.c_str(), -1);
+ if( copy || !this->InstallQuiet )
+ this->Makefile->DisplayStatus(message.c_str(), -1);
if(type != TypeDir)
{
// Add the file to the manifest.
More information about the cmake-developers
mailing list