[mlpack] 41/44: Merge CMake update from trunk
Barak A. Pearlmutter
barak+git at pearlmutter.net
Mon Feb 15 19:35:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to tag mlpack-1.0.11
in repository mlpack.
commit fbe7433e2413cbfcf807f6221305b70e37504a91
Author: Ryan Curtin <ryan at ratml.org>
Date: Wed Dec 10 21:53:17 2014 +0000
Merge CMake update from trunk
---
CMake/FindArmadillo.cmake | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 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 "")
@@ -281,13 +281,13 @@ if(EXISTS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/config.hpp")
endif()
endif()
endif()
-
+
if(NOT HDF5_FOUND)
# We tried but didn't find it.
message(FATAL_ERROR "Armadillo HDF5 support is enabled, but HDF5 "
"cannot be found on the system. Consider disabling HDF5 support.")
endif()
-
+
set(SUPPORT_INCLUDE_DIRS "${HDF5_INCLUDE_DIRS}")
set(SUPPORT_LIBRARIES "${HDF5_LIBRARIES}")
endif()
@@ -317,7 +317,7 @@ if(EXISTS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/config.hpp")
message(FATAL_ERROR "Armadillo HDF5 support is enabled, but HDF5 "
"cannot be found on the system. Consider disabling HDF5 support.")
endif()
-
+
set(SUPPORT_INCLUDE_DIRS "${HDF5_INCLUDE_DIRS}")
endif()
@@ -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)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list