Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lapack] add metaport lapack to switch lapack impl with an overlay #12464

Merged
merged 6 commits into from
Aug 7, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ports/armadillo/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Source: armadillo
Version: 2019-04-16-8
Version: 2019-04-16
Port-Version: 9
Description: Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use
Build-Depends: openblas (!osx), clapack (!osx)
Build-Depends: openblas (!osx), lapack-select[core]
3 changes: 2 additions & 1 deletion ports/blaze/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: blaze
Version: 3.7
Build-Depends: clapack (!osx), boost-exception
Port-Version: 1
Build-Depends: lapack-select[core], boost-exception
Homepage: https://bitbucket.org/blaze-lib/blaze
Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic.
5 changes: 3 additions & 2 deletions ports/ceres/CONTROL
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Source: ceres
Version: 1.14.0-7
Version: 1.14.0
Port-Version: 8
Build-Depends: glog, eigen3
Homepage: https://github.com/ceres-solver/ceres-solver
Description: non-linear optimization package

Feature: lapack
Build-Depends: clapack (!osx)
Build-Depends: lapack-select[core]
Description: Use Lapack in Ceres

Feature: suitesparse
Expand Down
3 changes: 2 additions & 1 deletion ports/clapack/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: clapack
Version: 3.2.1-13
Version: 3.2.1
Port-Version: 13
Homepage: https://www.netlib.org/clapack
Description: CLAPACK (f2c'ed version of LAPACK)
Build-Depends: openblas (!osx)
5 changes: 3 additions & 2 deletions ports/dlib/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Source: dlib
Version: 19.19-1
Build-Depends: libjpeg-turbo, libpng, openblas (!osx), clapack (!osx)
Version: 19.19
Port-Version: 2
Build-Depends: libjpeg-turbo, libpng, openblas (!osx), lapack-select[core]
Homepage: https://github.com/davisking/dlib
Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++
Default-Features: fftw3, sqlite3
Expand Down
3 changes: 2 additions & 1 deletion ports/ensmallen/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Source: ensmallen
Version: 2.11.2
Port-Version: 1
Homepage: https://github.com/mlpack/ensmallen
Description: A header-only C++ library for mathematical optimization.
Build-Depends: openblas (!osx), clapack (!osx), armadillo
Build-Depends: openblas (!osx), lapack-select[core], armadillo

3 changes: 2 additions & 1 deletion ports/g2o/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: g2o
Version: 2020-02-07
Build-Depends: suitesparse, eigen3, clapack (!osx), ceres
Port-Version: 1
Build-Depends: suitesparse, eigen3, lapack-select[core], ceres
Description: g2o: A General Framework for Graph Optimization
Homepage: https://openslam.org/g2o.html
5 changes: 3 additions & 2 deletions ports/geogram/CONTROL
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Source: geogram
Version: 1.6.9-7
Version: 1.6.9
Port-Version: 8
Homepage: https://gforge.inria.fr/projects/geogram/
Description: Geogram is a programming library of geometric algorithms.
Build-Depends: openblas (!osx), clapack (!osx)
Build-Depends: openblas (!osx), lapack-select[core]

Feature: graphics
Description: Build viewers and geogram_gfx library.
Expand Down
5 changes: 5 additions & 0 deletions ports/lapack-select/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.17)

project(Find_LAPACK_external)
find_package(LAPACK REQUIRED)
#TODO make sure that the found LAPACK is outside VCPKG
18 changes: 18 additions & 0 deletions ports/lapack-select/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Source: lapack-select
Version: 1
Description: Port to select the LAPACK — Linear Algebra PACKage implementation
Default-Features: platform-select

Feature: clapack
Description: Use clapack
Build-Depends: clapack

Feature: lapack-reference
Description: Use the netlib lapack reference implementation (TODO)

Feature: external
Description: Use a LAPACK library outside of VCPKG. This port makes sure it can be found via CMake

Feature: platform-select
Description: Used to select the default implementation by platform. Workaround since Default-Features does not allow conditionals
Build-Depends: lapack-select[core,clapack] (!osx), lapack-select[core,external] (osx)
20 changes: 20 additions & 0 deletions ports/lapack-select/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)

list(REMOVE_ITEM FEATURES platform-select)

list(LENGTH FEATURES NUMBER_ELEMS)
if(NUMBER_ELEMS GREATER 2)
message(FATAL_ERROR "Cannot select more than one LAPACK implementation!")
# Ports cannot depend on more than one LAPACK implementation. Always use Build-Depends: lapack-select[core]
endif()
if(NUMBER_ELEMS LESS 2)
message(FATAL_ERROR "Need to select at least one LAPACK implementation! Only using feature [core] is not supported")
# Ports should only depend on lapack-select[core] so that they don't implicitly depend on the selected default feature
endif()

# In the future this port might also be used to install a vcpkg-cmake-wrapper or
# a FindLAPACK module to make sure all dependent ports use the same LAPACK implementation

IF("external" IN_LIST FEATURES)
vcpkg_configure_cmake(SOURCE_PATH ${CURRENT_PORT_DIR})
endif()
5 changes: 3 additions & 2 deletions ports/mlpack/CONTROL
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Source: mlpack
Version: 3.2.2-3
Version: 3.2.2
Port-Version: 4
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), clapack (!osx), boost, armadillo, ensmallen, stb
Build-Depends: openblas (!osx), lapack-select[core], boost, armadillo, ensmallen, stb
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem to depend on openblas or lapack directly.


Feature: tools
Description: Build command-line executables.
5 changes: 3 additions & 2 deletions ports/suitesparse/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Source: suitesparse
Version: 5.4.0-6
Build-Depends: clapack (!osx)
Version: 5.4.0
Port-Version: 7
Build-Depends: lapack-select[core]
Homepage: http://faculty.cse.tamu.edu/davis/SuiteSparse
Description: algebra library

Expand Down