diff options
author | Brad King <brad.king@kitware.com> | 2014-06-24 15:18:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-06-24 17:18:20 (GMT) |
commit | c9568de52c4e11c04a9f758ea9ecc1e72ea7cbfb (patch) | |
tree | 650b97387b48c5e3851d857955ca3ea2d17e1d29 /Source/cmInstallGenerator.cxx | |
parent | ec7cf7ea1311adaf6eb8dd1ab5c2aa8e3745339e (diff) | |
download | CMake-c9568de52c4e11c04a9f758ea9ecc1e72ea7cbfb.zip CMake-c9568de52c4e11c04a9f758ea9ecc1e72ea7cbfb.tar.gz CMake-c9568de52c4e11c04a9f758ea9ecc1e72ea7cbfb.tar.bz2 |
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>
Diffstat (limited to 'Source/cmInstallGenerator.cxx')
-rw-r--r-- | Source/cmInstallGenerator.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx index 0bc4073..7c6c5ae 100644 --- a/Source/cmInstallGenerator.cxx +++ b/Source/cmInstallGenerator.cxx @@ -11,6 +11,7 @@ ============================================================================*/ #include "cmInstallGenerator.h" +#include "cmMakefile.h" #include "cmSystemTools.h" //---------------------------------------------------------------------------- @@ -98,6 +99,13 @@ void cmInstallGenerator { os << " OPTIONAL"; } + switch(this->Message) + { + case MessageDefault: break; + case MessageAlways: os << " MESSAGE_ALWAYS"; break; + case MessageLazy: os << " MESSAGE_LAZY"; break; + case MessageNever: os << " MESSAGE_NEVER"; break; + } if(permissions_file && *permissions_file) { os << " PERMISSIONS" << permissions_file; @@ -182,3 +190,23 @@ std::string cmInstallGenerator::GetInstallDestination() const result += this->Destination; return result; } + +//---------------------------------------------------------------------------- +cmInstallGenerator::MessageLevel +cmInstallGenerator::SelectMessageLevel(cmMakefile* mf) +{ + std::string m = mf->GetSafeDefinition("CMAKE_INSTALL_MESSAGE"); + if(m == "ALWAYS") + { + return MessageAlways; + } + if(m == "LAZY") + { + return MessageLazy; + } + if(m == "NEVER") + { + return MessageNever; + } + return MessageDefault; +} |