aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2021-06-11 07:16:36 +0800
committerGitHub <noreply@github.com>2021-06-10 16:16:36 -0700
commitcbe38c8280a6d95fe5c895ef32090e9797af4aff (patch)
tree9a12861816aec7ad480560c02e79336061adb0b3 /ports
parent03992f2e1dfe78568ec95a381b7f65c90d7cd42d (diff)
downloadvcpkg-cbe38c8280a6d95fe5c895ef32090e9797af4aff.tar.gz
vcpkg-cbe38c8280a6d95fe5c895ef32090e9797af4aff.zip
[openblas] Add feature simplethread and thread (#18265)
* [openblas] Add feature simplethread and thread * update version record * Update ports/openblas/portfile.cmake * Update ports/openblas/vcpkg.json * Update ports/openblas/vcpkg.json * Update versions/o-/openblas.json
Diffstat (limited to 'ports')
-rw-r--r--ports/openblas/CONTROL5
-rw-r--r--ports/openblas/portfile.cmake11
-rw-r--r--ports/openblas/vcpkg.json32
3 files changed, 41 insertions, 7 deletions
diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL
deleted file mode 100644
index 898b74eba..000000000
--- a/ports/openblas/CONTROL
+++ /dev/null
@@ -1,5 +0,0 @@
-Source: openblas
-Version: 0.3.10
-Homepage: https://github.com/xianyi/OpenBLAS
-Build-Depends: pthread (!windows&!uwp)
-Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake
index 81f45c3e9..05e68a175 100644
--- a/ports/openblas/portfile.cmake
+++ b/ports/openblas/portfile.cmake
@@ -25,6 +25,12 @@ set(PATH_BACKUP "$ENV{PATH}")
vcpkg_add_to_path("${PERL_EXE_PATH}")
vcpkg_add_to_path("${SED_EXE_PATH}")
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ threads USE_THREAD
+ simplethread USE_SIMPLE_THREADED_LEVEL3
+)
+
set(COMMON_OPTIONS -DBUILD_WITHOUT_LAPACK=ON)
# for UWP version, must build non uwp first for helper
@@ -40,7 +46,7 @@ if(VCPKG_TARGET_IS_UWP)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS
+ OPTIONS ${FEATURE_OPTIONS}
${COMMON_OPTIONS}
-DTARGET=NEHALEM
)
@@ -69,7 +75,8 @@ elseif(VCPKG_TARGET_IS_WINDOWS)
PREFER_NINJA
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
- ${COMMON_OPTIONS})
+ ${COMMON_OPTIONS}
+ )
else()
list(APPEND VCPKG_C_FLAGS "-DNEEDBUNDERSCORE") # Required to get common BLASFUNC to append extra _
list(APPEND VCPKG_CXX_FLAGS "-DNEEDBUNDERSCORE")
diff --git a/ports/openblas/vcpkg.json b/ports/openblas/vcpkg.json
new file mode 100644
index 000000000..f29249cad
--- /dev/null
+++ b/ports/openblas/vcpkg.json
@@ -0,0 +1,32 @@
+{
+ "name": "openblas",
+ "version": "0.3.10",
+ "port-version": 1,
+ "description": "OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.",
+ "homepage": "https://github.com/xianyi/OpenBLAS",
+ "default-features": [
+ "threads"
+ ],
+ "features": {
+ "simplethread": {
+ "description": "Use simple thread",
+ "dependencies": [
+ {
+ "name": "openblas",
+ "features": [
+ "thread"
+ ]
+ }
+ ]
+ },
+ "threads": {
+ "description": "Use a threading backend",
+ "dependencies": [
+ {
+ "name": "pthread",
+ "platform": "!windows & !uwp"
+ }
+ ]
+ }
+ }
+}