install: Add CMAKE_INSTALL_MESSAGE variable (#13761)

Create a variable to allow users to control which installation
messages are printed.  In particular, provide a "LAZY" setting
that prints "Installing" messages but not "Up-to-date" messages.
This is desirable for incremental re-installations.

Suggested-by: J Decker <d3ck0r@gmail.com>
This commit is contained in:
Brad King
2014-06-24 11:18:43 -04:00
parent ec7cf7ea13
commit c9568de52c
15 changed files with 113 additions and 8 deletions
+7
View File
@@ -16,6 +16,7 @@
#include "cmScriptGenerator.h"
class cmLocalGenerator;
class cmMakefile;
/** \class cmInstallGenerator
* \brief Support class for generating install scripts.
@@ -27,6 +28,9 @@ public:
enum MessageLevel
{
MessageDefault,
MessageAlways,
MessageLazy,
MessageNever
};
cmInstallGenerator(const char* destination,
@@ -56,6 +60,9 @@ public:
/** Test if this generator installs something for a given configuration. */
bool InstallsForConfig(const std::string& config);
/** Select message level from CMAKE_INSTALL_MESSAGE. */
static MessageLevel SelectMessageLevel(cmMakefile* mf);
protected:
virtual void GenerateScript(std::ostream& os);