[mlpack-git] master: Work with mlpack::backtrace only when HAS_BFD_DL.. (171c35b)

gitdub at mlpack.org gitdub at mlpack.org
Thu Feb 25 16:30:36 EST 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/fd84f3a2e53592d723a8e8a76dadb8aa76820913...1a9c41a86be1fa1dcc5c3b90dd959c2255c3bb8e

>---------------------------------------------------------------

commit 171c35b253f9b4bb7c463346094a3bb4f1952bb3
Author: Grzegorz Krajewski <krajekg at gmail.com>
Date:   Thu Feb 25 22:30:36 2016 +0100

    Work with mlpack::backtrace only when HAS_BFD_DL..
    
    ... libs


>---------------------------------------------------------------

171c35b253f9b4bb7c463346094a3bb4f1952bb3
 src/mlpack/core/util/prefixedoutstream_impl.hpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mlpack/core/util/prefixedoutstream_impl.hpp b/src/mlpack/core/util/prefixedoutstream_impl.hpp
index bafc151..fd1f164 100644
--- a/src/mlpack/core/util/prefixedoutstream_impl.hpp
+++ b/src/mlpack/core/util/prefixedoutstream_impl.hpp
@@ -10,7 +10,11 @@
 
 // Just in case it hasn't been included.
 #include "prefixedoutstream.hpp"
-#include "backtrace.hpp"
+
+#ifdef HAS_BFD_DL
+  #include "backtrace.hpp"
+#endif
+
 #include <iostream>
 
 namespace mlpack {
@@ -67,6 +71,7 @@ void PrefixedOutStream::BaseLogic(const T& val)
     // and the prefix and continue looking.
     size_t nl;
     size_t pos = 0;
+#ifdef HAS_BFD_DL
     if(fatal)
     {
       Backtrace bt;
@@ -84,7 +89,7 @@ void PrefixedOutStream::BaseLogic(const T& val)
 	pos = nl + 1;
       }
     }
-     
+#endif     
     //The same logic like above, but this time for 'line'.
     pos = 0;
     while ((nl = line.find('\n', pos)) != std::string::npos)




More information about the mlpack-git mailing list