From 33cc95f72c6e02994de995e479e8b635d64ec199 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 1 Feb 2025 19:43:07 +0900 Subject: [PATCH] [libdivide] add CPU features --- ports/libdivide/portfile.cmake | 12 ++++++++---- ports/libdivide/vcpkg.json | 17 +++++++++++++++++ versions/baseline.json | 2 +- versions/l-/libdivide.json | 5 +++++ 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/ports/libdivide/portfile.cmake b/ports/libdivide/portfile.cmake index 008a6037f67a7a..fd8d6bc06c7103 100644 --- a/ports/libdivide/portfile.cmake +++ b/ports/libdivide/portfile.cmake @@ -13,14 +13,18 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS test LIBDIVIDE_BUILD_TESTS ) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "sse2" LIBDIVIDE_SSE2 + "avx2" LIBDIVIDE_AVX2 + "avx512" LIBDIVIDE_AVX512 + "neon" LIBDIVIDE_NEON +) + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} - -DLIBDIVIDE_SSE2=OFF - -DLIBDIVIDE_AVX2=OFF - -DLIBDIVIDE_AVX512=OFF - -DLIBDIVIDE_NEON=OFF ) vcpkg_cmake_install() diff --git a/ports/libdivide/vcpkg.json b/ports/libdivide/vcpkg.json index e5a020049c12a0..9b7062cc079732 100644 --- a/ports/libdivide/vcpkg.json +++ b/ports/libdivide/vcpkg.json @@ -1,6 +1,7 @@ { "name": "libdivide", "version": "5.2.0", + "port-version": 1, "description": "libdivide.h is a header-only C/C++ library for optimizing integer division.", "homepage": "https://github.com/ridiculousfish/libdivide", "dependencies": [ @@ -14,6 +15,22 @@ } ], "features": { + "avx2": { + "description": "use avx2 instruction", + "supports": "x86 | x64" + }, + "avx512": { + "description": "use avx512 instruction", + "supports": "x86 | x64" + }, + "neon": { + "description": "use avx512 instruction", + "supports": "arm" + }, + "sse2": { + "description": "use sse2 instruction", + "supports": "x86 | x64" + }, "test": { "description": "Build test" } diff --git a/versions/baseline.json b/versions/baseline.json index b65ca1a3505cbe..f1d09b7acfa20c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4446,7 +4446,7 @@ }, "libdivide": { "baseline": "5.2.0", - "port-version": 0 + "port-version": 1 }, "libdjinterop": { "baseline": "0.24.3", diff --git a/versions/l-/libdivide.json b/versions/l-/libdivide.json index 1dde80d3d91f0d..20236da6142cbd 100644 --- a/versions/l-/libdivide.json +++ b/versions/l-/libdivide.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f17ae5f408853d70f8c647206e19b7ffe4a0dbc3", + "version": "5.2.0", + "port-version": 1 + }, { "git-tree": "5e81740fc7d610d3c1f30867c8aa127c7db25bcd", "version": "5.2.0",