[mlpack-git] master, mlpack-1.0.x: Move warning to prereqs.hpp, because sometimes prereqs.hpp is included and core.hpp is not. (4a4a524)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:51:50 EST 2015


Repository : https://github.com/mlpack/mlpack

On branches: master,mlpack-1.0.x
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

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

commit 4a4a52416f0c0066a1a9363f5e8673e26a228eb2
Author: Ryan Curtin <ryan at ratml.org>
Date:   Tue Jul 8 11:48:13 2014 +0000

    Move warning to prereqs.hpp, because sometimes prereqs.hpp is included and
    core.hpp is not.


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

4a4a52416f0c0066a1a9363f5e8673e26a228eb2
 src/mlpack/core.hpp    | 7 +------
 src/mlpack/prereqs.hpp | 9 ++++++++-
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/mlpack/core.hpp b/src/mlpack/core.hpp
index d39dff0..a6374f0 100644
--- a/src/mlpack/core.hpp
+++ b/src/mlpack/core.hpp
@@ -138,12 +138,7 @@
  *   - Andrew Wells <andrewmw94 at gmail.com>
  */
 
-// First, Check if armadillo was included before, warning if so
-#ifdef ARMA_INCLUDES
-#pragma message "Armadillo was included before mlpack."
-#endif
-
-// Next, include all of the prerequisites.
+// First, include all of the prerequisites.
 #include <mlpack/prereqs.hpp>
 
 // Now the core mlpack classes.
diff --git a/src/mlpack/prereqs.hpp b/src/mlpack/prereqs.hpp
index 1c15dae..fa18340 100644
--- a/src/mlpack/prereqs.hpp
+++ b/src/mlpack/prereqs.hpp
@@ -6,7 +6,14 @@
 #ifndef __MLPACK_PREREQS_HPP
 #define __MLPACK_PREREQS_HPP
 
-// First, standard includes.
+// First, check if Armadillo was included before, warning if so.
+#ifdef ARMA_INCLUDES
+#pragma message "Armadillo was included before mlpack; this can sometimes cause\
+problems.  It should only be necessary to include <mlpack/core.hpp> and not\
+<armadillo>."
+#endif
+
+// Next, standard includes.
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>



More information about the mlpack-git mailing list