From 03db202227ce72bcc5ccb04bed577d7b03e51902 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 16 May 2019 08:35:25 +0000 Subject: [PATCH 1/2] [armadillo]Add dependent port openblas and add vcpkg_configure_cmake options. --- ports/armadillo/CONTROL | 3 ++- ports/armadillo/portfile.cmake | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ports/armadillo/CONTROL b/ports/armadillo/CONTROL index d8edd620e4ed16..7fa8e7ba743f74 100644 --- a/ports/armadillo/CONTROL +++ b/ports/armadillo/CONTROL @@ -1,3 +1,4 @@ Source: armadillo -Version: 2019-04-16-f00d3225 +Version: 2019-04-16-f00d3225-1 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 \ No newline at end of file diff --git a/ports/armadillo/portfile.cmake b/ports/armadillo/portfile.cmake index 172984712d7495..3e172c4d10d2f5 100644 --- a/ports/armadillo/portfile.cmake +++ b/ports/armadillo/portfile.cmake @@ -11,11 +11,21 @@ vcpkg_from_gitlab( HEAD_REF 9.400.x ) +if (WIN32) + set(LIBRARY_SUFFIX ".lib") +elseif (UNIX) + set(LIBRARY_SUFFIX ".a") +else() + message(FATAL_ERROR "Unsupport platform: ${VCPKG_CMAKE_SYSTEM_NAME}") +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DDETECT_HDF5=false + -DBLAS_LIBRARY:FILEPATH=${CURRENT_INSTALLED_DIR}/lib/openblas${LIBRARY_SUFFIX} + -DLAPACK_LIBRARY:FILEPATH=${CURRENT_INSTALLED_DIR}/lib/openblas${LIBRARY_SUFFIX} ) vcpkg_install_cmake() @@ -26,4 +36,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Armadillo RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/armadillo RENAME copyright) From 7f11d433baac5992cb7f67b4cfe04b65874ee658 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 16 May 2019 09:40:56 +0000 Subject: [PATCH 2/2] [armadillo]re-fix usage error. --- ports/armadillo/CONTROL | 2 +- ports/armadillo/portfile.cmake | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/ports/armadillo/CONTROL b/ports/armadillo/CONTROL index 7fa8e7ba743f74..3959bcd5104dce 100644 --- a/ports/armadillo/CONTROL +++ b/ports/armadillo/CONTROL @@ -1,4 +1,4 @@ Source: armadillo Version: 2019-04-16-f00d3225-1 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 \ No newline at end of file +Build-Depends: clapack (!osx) \ No newline at end of file diff --git a/ports/armadillo/portfile.cmake b/ports/armadillo/portfile.cmake index 3e172c4d10d2f5..0f6e85cb930fff 100644 --- a/ports/armadillo/portfile.cmake +++ b/ports/armadillo/portfile.cmake @@ -11,21 +11,11 @@ vcpkg_from_gitlab( HEAD_REF 9.400.x ) -if (WIN32) - set(LIBRARY_SUFFIX ".lib") -elseif (UNIX) - set(LIBRARY_SUFFIX ".a") -else() - message(FATAL_ERROR "Unsupport platform: ${VCPKG_CMAKE_SYSTEM_NAME}") -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DDETECT_HDF5=false - -DBLAS_LIBRARY:FILEPATH=${CURRENT_INSTALLED_DIR}/lib/openblas${LIBRARY_SUFFIX} - -DLAPACK_LIBRARY:FILEPATH=${CURRENT_INSTALLED_DIR}/lib/openblas${LIBRARY_SUFFIX} ) vcpkg_install_cmake()