diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-06-02 15:26:10 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-06-02 15:26:10 (GMT) |
commit | 886c559518ebf39ac91d6048c9c92320a9cde82e (patch) | |
tree | 5874e1302846ad9ee342ad7147bb1346218a1ac3 /Source/CPack | |
parent | 87d4d0e0394f30bb320b3939b1852a7cae2177cb (diff) | |
download | CMake-886c559518ebf39ac91d6048c9c92320a9cde82e.zip CMake-886c559518ebf39ac91d6048c9c92320a9cde82e.tar.gz CMake-886c559518ebf39ac91d6048c9c92320a9cde82e.tar.bz2 |
ENH: Display cmake install information when in verbose mode
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackGenericGenerator.cxx | 15 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenericGenerator.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackGenericGenerator.cxx b/Source/CPack/cmCPackGenericGenerator.cxx index 0d122cb..9a8280e 100644 --- a/Source/CPack/cmCPackGenericGenerator.cxx +++ b/Source/CPack/cmCPackGenericGenerator.cxx @@ -43,6 +43,20 @@ cmCPackGenericGenerator::~cmCPackGenericGenerator() } //---------------------------------------------------------------------- +void cmCPackGenericGeneratorProgress(const char *msg, float prog, void* ptr) +{ + cmCPackGenericGenerator* self = static_cast<cmCPackGenericGenerator*>(ptr); + self->DisplayVerboseOutput(msg, prog); +} + +//---------------------------------------------------------------------- +void cmCPackGenericGenerator::DisplayVerboseOutput(const char* msg, + float progress) +{ + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "" << msg << std::endl); +} + +//---------------------------------------------------------------------- int cmCPackGenericGenerator::PrepareNames() { this->SetOption("CPACK_GENERATOR", this->Name.c_str()); @@ -381,6 +395,7 @@ int cmCPackGenericGenerator::InstallProject() cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Install project: " << installProjectName << std::endl); cmake cm; + cm.SetProgressCallback(cmCPackGenericGeneratorProgress, this); cmGlobalGenerator gg; gg.SetCMakeInstance(&cm); std::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator()); diff --git a/Source/CPack/cmCPackGenericGenerator.h b/Source/CPack/cmCPackGenericGenerator.h index 6867613..0d46064 100644 --- a/Source/CPack/cmCPackGenericGenerator.h +++ b/Source/CPack/cmCPackGenericGenerator.h @@ -87,6 +87,9 @@ public: //! Set the logger void SetLogger(cmCPackLog* log) { this->Logger = log; } + //! Display verbose information via logger + void DisplayVerboseOutput(const char* msg, float progress); + protected: int PrepareNames(); int InstallProject(); |