Browse Source

BUG: Print the right line number to the right pipe

Andy Cedilnik 20 years ago
parent
commit
af923d13fa
1 changed files with 8 additions and 1 deletions
  1. 8 1
      Source/CPack/cmCPackLog.cxx

+ 8 - 1
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 )