diff options
-rw-r--r-- | Source/CPack/cmCPackLog.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx index 331630b..4b7d285 100644 --- a/Source/CPack/cmCPackLog.cxx +++ b/Source/CPack/cmCPackLog.cxx @@ -195,7 +195,14 @@ void cmCPackLog::Log(int tag, const char* file, int line, const char* msg, size_ } if ( useFileAndLine ) { - *m_DefaultOutput << __FILE__ << ":" << __LINE__ << " "; + if ( error || warning ) + { + *m_DefaultError << file << ":" << line << " "; + } + else + { + *m_DefaultOutput << file << ":" << line << " "; + } } } if ( error || warning ) |