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

[mlpack] Add feature openmp #18942

Merged
merged 5 commits into from
Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions ports/mlpack/fix-dependencies.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4dd92f0..bfa697d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -488,7 +488,7 @@ add_definitions(-DBOOST_TEST_DYN_LINK)
# }
# #endif
if (USE_OPENMP)
- find_package(OpenMP)
+ find_package(OpenMP REQUIRED)
endif ()

if (OPENMP_FOUND)
5 changes: 4 additions & 1 deletion ports/mlpack/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vcpkg_from_github(
cmakelists.patch
fix-configure-error.patch
fix-test-dependency.patch
fix-dependencies.patch
)

file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACML.cmake)
Expand All @@ -22,7 +23,9 @@ file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindOpenBLAS.cmake)
file(REMOVE ${SOURCE_PATH}/CMake/FindArmadillo.cmake)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
tools BUILD_CLI_EXECUTABLES
FEATURES
tools BUILD_CLI_EXECUTABLES
openmp USE_OPENMP
)

vcpkg_configure_cmake(
Expand Down
5 changes: 4 additions & 1 deletion ports/mlpack/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mlpack",
"version": "3.4.1",
"port-version": 1,
"port-version": 2,
"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.",
"homepage": "https://github.com/mlpack/mlpack",
"supports": "uwp",
Expand All @@ -17,6 +17,9 @@
"stb"
],
"features": {
"openmp": {
"description": "use OpenMP for parallelization."
},
"tools": {
"description": "Build command-line executables."
}
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4070,7 +4070,7 @@
},
"mlpack": {
"baseline": "3.4.1",
"port-version": 1
"port-version": 2
},
"mman": {
"baseline": "git-f5ff813-3",
Expand Down
5 changes: 5 additions & 0 deletions versions/m-/mlpack.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "587ee2575ef7543ff9a0ed30e645154db26f0001",
"version": "3.4.1",
"port-version": 2
},
{
"git-tree": "4793fb5802e10e645d5d33e0ec2baf6f1a0a337b",
"version": "3.4.1",
Expand Down