From af923d13fa442205e91b69950b17cdd976fe9967 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 5 Jan 2006 12:16:11 -0500 Subject: BUG: Print the right line number to the right pipe --- Source/CPack/cmCPackLog.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 ) -- cgit v0.12