mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-11-23 11:19:43 +00:00
[mlpack ensmallen] Update to latest revision (#10070)
This commit is contained in:
parent
330ef69f9e
commit
f41d64c18f
@ -1,5 +1,6 @@
|
||||
Source: ensmallen
|
||||
Version: 1.15.1
|
||||
Version: 2.11.2
|
||||
Homepage: https://github.com/mlpack/ensmallen
|
||||
Description: A header-only C++ library for mathematical optimization.
|
||||
Build-Depends: openblas (!osx), clapack (!osx), armadillo
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1577be5..b0171b2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -57,6 +57,7 @@ install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/ensmallen_bits"
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/include/ensmallen.hpp
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/include")
|
||||
|
||||
-enable_testing()
|
||||
-
|
||||
-add_subdirectory(tests)
|
||||
+# Disable tests
|
||||
+#enable_testing()
|
||||
+#
|
||||
+#add_subdirectory(tests)
|
@ -1,21 +1,20 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO mlpack/ensmallen
|
||||
REF 8bea8d214b40be3cb42e817328c0791541fbcd6c
|
||||
SHA512 b075b763c136c1d2d5088c533a8557e3d425da7bcfeb3748063c1e3225e58969eddfc5bd786cb02f29f71ea5e3288327481a0961f64b1d2ff1251a0f59c07779
|
||||
REF ba0897d57f52db9578e5e44426eb3220d5bd917f # v2.11.2
|
||||
SHA512 715c87b407487c1b5f1b2e95c23151c80d84bda8e5bd879f71e41871bc9a10bb157acf67fa2814b180da4c426a842bf84f29ce0d3bd3a2df4bfab382f5bb04d3
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
disable_tests.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_TESTS=OFF
|
||||
)
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ensmallen RENAME copyright)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
Source: mlpack
|
||||
Version: 3.1.1-1
|
||||
Version: 3.2.2
|
||||
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
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b158498..50f1def 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -286,7 +286,7 @@ if (WIN32)
|
||||
find_package(LAPACK)
|
||||
find_package(BLAS)
|
||||
set(ARMADILLO_LIBRARIES
|
||||
- ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY})
|
||||
+ ${ARMADILLO_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
# Include directories for the previous dependencies.
|
@ -1,48 +1,80 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 26757a5..c200b40 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -283,25 +283,8 @@
|
||||
@@ -288,6 +288,7 @@ endif()
|
||||
# and find LAPACK and BLAS ourselves, using a slightly modified variant of the
|
||||
# script Armadillo uses to find these.
|
||||
if (WIN32)
|
||||
- find_library(LAPACK_LIBRARY
|
||||
- NAMES lapack liblapack lapack_win32_MT lapack_win32
|
||||
- PATHS "C:/Program Files/Armadillo"
|
||||
- PATH_SUFFIXES "examples/lib_win32/")
|
||||
-
|
||||
- if (NOT LAPACK_LIBRARY)
|
||||
- message(FATAL_ERROR "Cannot find LAPACK library (.lib)!")
|
||||
- endif ()
|
||||
-
|
||||
- find_library(BLAS_LIBRARY
|
||||
- NAMES blas libblas blas_win32_MT blas_win32
|
||||
- PATHS "C:/Program Files/Armadillo"
|
||||
- PATH_SUFFIXES "examples/lib_win32/")
|
||||
-
|
||||
- if (NOT BLAS_LIBRARY)
|
||||
- message(FATAL_ERROR "Cannot find BLAS library (.lib)!")
|
||||
- endif ()
|
||||
-
|
||||
- # Piggyback LAPACK and BLAS linking into Armadillo link.
|
||||
+ find_package(LAPACK)
|
||||
+ find_package(BLAS)
|
||||
+ if(0)
|
||||
find_library(LAPACK_LIBRARY
|
||||
NAMES lapack liblapack lapack_win32_MT lapack_win32
|
||||
PATHS "C:/Program Files/Armadillo"
|
||||
@@ -305,24 +306,31 @@ 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)
|
||||
# Piggyback LAPACK and BLAS linking into Armadillo link.
|
||||
set(ARMADILLO_LIBRARIES
|
||||
${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY})
|
||||
- ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY})
|
||||
+ ${ARMADILLO_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
|
||||
# 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}")
|
||||
+ 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}")
|
||||
+ get_filename_component(LAPACK_DLL_DIR "${LAPACK_DIR}" ABSOLUTE)
|
||||
set(DLL_COPY_DIRS ${DLL_COPY_DIRS} "${BLAS_DLL_DIR}")
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -395,19 +378,11 @@
|
||||
@@ -415,8 +423,8 @@ if (NOT ENSMALLEN_FOUND)
|
||||
"Successfully downloaded ensmallen into ${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/")
|
||||
|
||||
# Now we have to also ensure these header files get installed.
|
||||
- install(DIRECTORY "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen_bits/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ensmallen_bits")
|
||||
- install(FILES "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen.hpp" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
+ #install(DIRECTORY "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen_bits/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ensmallen_bits")
|
||||
+ #install(FILES "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen.hpp" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
else ()
|
||||
message(FATAL_ERROR "Problem unpacking ensmallen! Expected only one directory ensmallen-x.y.z/; found ${ENS_DIRECTORIES}. Try removing the directory ${CMAKE_BINARY_DIR}/deps and reconfiguring.")
|
||||
endif ()
|
||||
@@ -472,6 +480,7 @@ find_package(Boost 1.49
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
-link_directories(${Boost_LIBRARY_DIRS})
|
||||
-
|
||||
-# In Visual Studio, automatic linking is performed, so we don't need to worry
|
||||
-# about it. Clear the list of libraries to link against and let Visual Studio
|
||||
-# handle it.
|
||||
-if (MSVC)
|
||||
- link_directories(${Boost_LIBRARY_DIRS})
|
||||
- set(Boost_LIBRARIES "")
|
||||
-endif ()
|
||||
+link_directories(${Boost_LIBRARIES})
|
||||
+if(0)
|
||||
link_directories(${Boost_LIBRARY_DIRS})
|
||||
|
||||
# In Visual Studio, automatic linking is performed, so we don't need to worry
|
||||
@@ -483,10 +492,12 @@ if (MSVC)
|
||||
message("boost lib dirs ${Boost_LIBRARY_DIRS}")
|
||||
set(Boost_LIBRARIES "")
|
||||
endif ()
|
||||
+endif()
|
||||
|
||||
+link_directories(${Boost_LIBRARIES})
|
||||
set(MLPACK_INCLUDE_DIRS ${MLPACK_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
|
||||
set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} ${Boost_LIBRARIES})
|
||||
-set(MLPACK_LIBRARY_DIRS ${MLPACK_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS})
|
||||
|
@ -1,14 +1,11 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO mlpack/mlpack
|
||||
REF mlpack-3.1.1
|
||||
SHA512 4acef74da951934b9bd1cabd87b9d6d002c80eb3218f69755277fa654d928aed379a5e63987f32ec162cc005c2952e618d6d528c2311aebb8cd2cc01cab71f86
|
||||
REF a8af4882af5e163ae8c8023653c66c8914ac1c22 # 3.2.2
|
||||
SHA512 879dd24f6cface3e6e1a0990e912ca4463060725c7c105e1e7d228c90123b1f44728cbe1ae327fa20e0e4981626a5d1eb2c411257899ef849c9600891616eed4
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
cmakelists.patch
|
||||
blas_lapack.patch
|
||||
)
|
||||
|
||||
file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACML.cmake)
|
||||
@ -22,10 +19,9 @@ file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindMKL.cmake)
|
||||
file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindOpenBLAS.cmake)
|
||||
file(REMOVE ${SOURCE_PATH}/CMake/FindArmadillo.cmake)
|
||||
|
||||
set(BUILD_TOOLS OFF)
|
||||
if("tools" IN_LIST FEATURES)
|
||||
set(BUILD_TOOLS ON)
|
||||
endif()
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
tools BUILD_TOOLS
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
@ -33,13 +29,14 @@ vcpkg_configure_cmake(
|
||||
OPTIONS
|
||||
-DBUILD_TESTS=${BUILD_TOOLS}
|
||||
-DBUILD_CLI_EXECUTABLES=${BUILD_TOOLS}
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/mlpack RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
if(BUILD_TOOLS)
|
||||
if("tools" IN_LIST FEATURES)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools)
|
||||
file(GLOB MLPACK_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
||||
file(COPY ${MLPACK_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||
|
Loading…
Reference in New Issue
Block a user