[mlpack-git] mlpack-1.0.x: Merge CMake update from trunk (fbe7433)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:07:45 EST 2015


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

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

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

commit fbe7433e2413cbfcf807f6221305b70e37504a91
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Dec 10 21:53:17 2014 +0000

    Merge CMake update from trunk


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

fbe7433e2413cbfcf807f6221305b70e37504a91
 CMake/FindArmadillo.cmake | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/CMake/FindArmadillo.cmake b/CMake/FindArmadillo.cmake
index 9db6c73..86a1cb5 100644
--- a/CMake/FindArmadillo.cmake
+++ b/CMake/FindArmadillo.cmake
@@ -79,16 +79,16 @@ if(EXISTS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/config.hpp")
   string(REGEX MATCH "\r?\n[\t ]*#define[ \t]+ARMA_USE_WRAPPER[ \t]*\r?\n" ARMA_USE_WRAPPER "${_armadillo_CONFIG_CONTENTS}")
 
   # ARMA_USE_LAPACK
-  string(REGEX MATCH "\r?\n[\t ]*#define[ \t]+ARMA_USE_LAPACK[ \t]*\r?\n" ARMA_USE_LAPACK "${_armadillo_CONFIG_CONTENTS}")
+  string(REGEX MATCH "\r?\n[\t ]*#if[\t ]+!defined[(]ARMA_USE_LAPACK[)][\t ]*\r?\n[\t ]*#define[ \t]+ARMA_USE_LAPACK[ \t]*\r?\n" ARMA_USE_LAPACK "${_armadillo_CONFIG_CONTENTS}")
 
   # ARMA_USE_BLAS
-  string(REGEX MATCH "\r?\n[\t ]*#define[ \t]+ARMA_USE_BLAS[ \t]*\r?\n" ARMA_USE_BLAS "${_armadillo_CONFIG_CONTENTS}")
+  string(REGEX MATCH "\r?\n[\t ]*#if[\t ]+!defined[(]ARMA_USE_BLAS[)][\t ]*\r?\n[\t ]*#define[ \t]+ARMA_USE_BLAS[ \t]*\r?\n" ARMA_USE_BLAS "${_armadillo_CONFIG_CONTENTS}")
     # ARMA_USE_ARPACK
   # ARMA_USE_ARPACK
-  string(REGEX MATCH "\r?\n[\t ]*#define[ \t]+ARMA_USE_ARPACK[ \t]*\r?\n" ARMA_USE_ARPACK "${_armadillo_CONFIG_CONTENTS}")
+  string(REGEX MATCH "\r?\n[\t ]*#if[\t ]+!defined[(]ARMA_USE_ARPACK[)][\t ]*\r?\n[\t ]*#define[ \t]+ARMA_USE_ARPACK[ \t]*\r?\n" ARMA_USE_ARPACK "${_armadillo_CONFIG_CONTENTS}")
 
   # Look for #define ARMA_USE_HDF5.
-  string(REGEX MATCH "\r?\n[\t ]*#define[ \t]+ARMA_USE_HDF5[ \t]*\r?\n" ARMA_USE_HDF5 "${_armadillo_CONFIG_CONTENTS}")
+  string(REGEX MATCH "\r?\n[\t ]*#if[\t ]+!defined[(]ARMA_USE_HDF5[)][\t ]*\r?\n[\t ]*#define[ \t]+ARMA_USE_HDF5[ \t]*\r?\n" ARMA_USE_HDF5 "${_armadillo_CONFIG_CONTENTS}")
 
   # If we aren't wrapping, things get a little more complex.
   if("${ARMA_USE_WRAPPER}" STREQUAL "")
@@ -350,7 +350,11 @@ if (ARMADILLO_FOUND)
   # Also include support include directories.
   set(ARMADILLO_INCLUDE_DIRS ${ARMADILLO_INCLUDE_DIR} ${SUPPORT_INCLUDE_DIRS})
   # Also include support libraries to link against.
-  set(ARMADILLO_LIBRARIES ${ARMADILLO_LIBRARY} ${SUPPORT_LIBRARIES})
+  if (ARMA_NEED_LIBRARY)
+    set(ARMADILLO_LIBRARIES ${ARMADILLO_LIBRARY} ${SUPPORT_LIBRARIES})
+  else (ARMA_NEED_LIBRARY)
+    set(ARMADILLO_LIBRARIES ${SUPPORT_LIBRARIES})
+  endif (ARMA_NEED_LIBRARY)
   message(STATUS "Armadillo libraries: ${ARMADILLO_LIBRARIES}")
 endif (ARMADILLO_FOUND)
 



More information about the mlpack-git mailing list