diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-01-02 21:14:21 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-01-02 21:14:21 (GMT) |
commit | bbf1c2d275ce58a76cfe5d3a6539a3bb490456b7 (patch) | |
tree | 73ebeba061fde907454361a8d51e7f9ddadbaa81 /Source/CPack/cmCPackGenericGenerator.h | |
parent | 9d0f86d7d017aa00420800bd72e00d45681710c9 (diff) | |
download | CMake-bbf1c2d275ce58a76cfe5d3a6539a3bb490456b7.zip CMake-bbf1c2d275ce58a76cfe5d3a6539a3bb490456b7.tar.gz CMake-bbf1c2d275ce58a76cfe5d3a6539a3bb490456b7.tar.bz2 |
ENH: More improvements and add logging
Diffstat (limited to 'Source/CPack/cmCPackGenericGenerator.h')
-rw-r--r-- | Source/CPack/cmCPackGenericGenerator.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackGenericGenerator.h b/Source/CPack/cmCPackGenericGenerator.h index f4725da..8ec0fb6 100644 --- a/Source/CPack/cmCPackGenericGenerator.h +++ b/Source/CPack/cmCPackGenericGenerator.h @@ -25,10 +25,28 @@ cmTypeMacro(class, superclass); \ static cmCPackGenericGenerator* CreateGenerator() { return new class; } +#define cmCPackLogger(logType, msg) \ + do { \ + cmOStringStream cmCPackLog_msg; \ + cmCPackLog_msg << msg; \ + m_Logger->Log(logType, __FILE__, __LINE__, cmCPackLog_msg.str().c_str());\ + } while ( 0 ) + +#ifdef cerr +# undef cerr +#endif +#define cerr no_cerr_use_cmCPack_Log + +#ifdef cout +# undef cout +#endif +#define cout no_cout_use_cmCPack_Log + class cmMakefile; class cmLocalGenerator; class cmGlobalGenerator; class cmake; +class cmCPackLog; /** \class cmCPackGenericGenerator * \brief A superclass of all CPack Generators @@ -67,6 +85,9 @@ public: //! Set all the variables int FindRunningCMake(const char* arg0); + //! Set the logger + void SetLogger(cmCPackLog* log) { m_Logger = log; } + protected: int PrepareNames(); int InstallProject(); @@ -90,6 +111,8 @@ protected: std::string m_CMakeSelf; std::string m_CMakeRoot; + cmCPackLog* m_Logger; + private: cmGlobalGenerator* m_GlobalGenerator; cmLocalGenerator* m_LocalGenerator; |