aboutsummaryrefslogtreecommitdiff
path: root/ports/mlpack
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2020-08-12 19:28:41 +0200
committerGitHub <noreply@github.com>2020-08-12 10:28:41 -0700
commitf3b96f339c3179f8f1c46b412d192e0c8a84eb5e (patch)
tree1602ac95f8097220ffb55a62bbce63322cab3a5b /ports/mlpack
parentdea76199aad32b41af3e6d33a265d62d187a3da2 (diff)
downloadvcpkg-f3b96f339c3179f8f1c46b412d192e0c8a84eb5e.tar.gz
vcpkg-f3b96f339c3179f8f1c46b412d192e0c8a84eb5e.zip
[lapack-reference|fortran] Add new port (#12805)
* [vcpkg/script] add vcpkg_find_fortran * [openblas] add pkg-config fixes * [lapack] add lapack-reference and reduce dependency on clapack * fix build issues * dont touch any main files * move toolchain var into parent scope * fix a few more issues * create link in the noblas case * removed unnecessary check handled by vcpkg_find_fortran. * move dumpbin check * fix last issue * depend on openblas * set cmake_binary_dir so that compiler id run gets put into buildtree. * more paths * add missing PARENT_SCOPE * ws change * [mlpack] remove dep on clapack * comment out patches * remove openblas again * Install lapack wrapper since it is missing linkage against -lm and -lgfortran * PREPEND mingw path to make sure cmake picks it up correctly * depend on openblas also on osx * add clapack on windows to skip due to conflicting library installs * add clapack to skip on linux * add -fPIC as a fortran compiler flag * do not add the flag on windows * add gcc explicitly to the cmake args. * ws change * applyrequested changes from CR * fix the failing patch
Diffstat (limited to 'ports/mlpack')
-rw-r--r--ports/mlpack/CONTROL2
-rw-r--r--ports/mlpack/cmakelists.patch18
2 files changed, 7 insertions, 13 deletions
diff --git a/ports/mlpack/CONTROL b/ports/mlpack/CONTROL
index a56987c3b..252c66997 100644
--- a/ports/mlpack/CONTROL
+++ b/ports/mlpack/CONTROL
@@ -1,6 +1,6 @@
Source: mlpack
Version: 3.2.2
-Port-Version: 4
+Port-Version: 5
Homepage: https://github.com/mlpack/mlpack
Description: mlpack is a fast, flexible machine learning library, written in C++, that aims to provide fast, extensible implementations of cutting-edge machine learning algorithms.
Build-Depends: openblas (!osx), lapack, boost, armadillo, ensmallen, stb
diff --git a/ports/mlpack/cmakelists.patch b/ports/mlpack/cmakelists.patch
index 9db41f912..79f176419 100644
--- a/ports/mlpack/cmakelists.patch
+++ b/ports/mlpack/cmakelists.patch
@@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26757a5..c200b40 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -288,6 +288,7 @@ endif()
+@@ -288,6 +282,7 @@ endif()
# and find LAPACK and BLAS ourselves, using a slightly modified variant of the
# script Armadillo uses to find these.
if (WIN32)
@@ -10,16 +10,14 @@ index 26757a5..c200b40 100644
find_library(LAPACK_LIBRARY
NAMES lapack liblapack lapack_win32_MT lapack_win32
PATHS "C:/Program Files/Armadillo"
-@@ -305,24 +306,31 @@ if (WIN32)
+@@ -305,24 +306,25 @@ if (WIN32)
if (NOT BLAS_LIBRARY)
message(FATAL_ERROR "Cannot find BLAS library (.lib)!")
endif ()
+ endif()
-+ find_package(clapack CONFIG REQUIRED)
-+ set(LAPACK_LIBRARIES lapack)
-+ find_package(OpenBLAS CONFIG REQUIRED)
-+ set(BLAS_LIBRARIES OpenBLAS::OpenBLAS)
++ find_package(LAPACK REQUIRED)
++ find_package(BLAS REQUIRED)
# Piggyback LAPACK and BLAS linking into Armadillo link.
set(ARMADILLO_LIBRARIES
- ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY})
@@ -28,23 +26,19 @@ index 26757a5..c200b40 100644
# Ensure that the libraries are added to the MSVC IDE runtime path.
- get_filename_component(BLAS_DIR ${BLAS_LIBRARY} DIRECTORY)
- get_filename_component(LAPACK_DIR ${LAPACK_LIBRARY} DIRECTORY)
-+ get_property(BLAS_DIR TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_LOCATION_RELEASE)
-+ get_filename_component(BLAS_DIR ${BLAS_DIR} DIRECTORY)
-+ get_property(LAPACK_DIR TARGET lapack PROPERTY IMPORTED_LOCATION_RELEASE)
-+ get_filename_component(LAPACK_DIR ${LAPACK_DIR} DIRECTORY)
# Sometimes, especially with an OpenBLAS install via nuget, the DLLs are
# actually in ../../bin/x64/. Automatically add these.
- if (EXISTS "${BLAS_DIR}/../../bin/x64/")
- get_filename_component(BLAS_DLL_DIR "${BLAS_DIR}/../../bin/x64" ABSOLUTE)
-+ if (EXISTS "${BLAS_DIR}")
++ if (0)
+ get_filename_component(BLAS_DLL_DIR "${BLAS_DIR}" ABSOLUTE)
set(DLL_COPY_DIRS ${DLL_COPY_DIRS} "${BLAS_DLL_DIR}")
endif ()
- if (EXISTS "${LAPACK_DIR}/../../bin/x64/")
- get_filename_component(LAPACK_DLL_DIR "${LAPACK_DIR}/../../bin/x64" ABSOLUTE)
-+ if (EXISTS "${LAPACK_DIR}")
++ if (0)
+ get_filename_component(LAPACK_DLL_DIR "${LAPACK_DIR}" ABSOLUTE)
set(DLL_COPY_DIRS ${DLL_COPY_DIRS} "${BLAS_DLL_DIR}")
endif ()