[cpu-features] Bump to 0.9.0 (#33831)

* [cpu-features] Bump to 0.9.0

* Update version database
This commit is contained in:
Weihang Ding 2023-09-19 00:14:08 +08:00 committed by GitHub
parent 056a1e2ed3
commit 219c8de643
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 82 deletions

View File

@ -1,18 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3e382a4..63ef346 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,11 +57,11 @@ set(PROCESSOR_IS_RISCV FALSE)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
set(PROCESSOR_IS_MIPS TRUE)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|ARM64)")
set(PROCESSOR_IS_AARCH64 TRUE)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
set(PROCESSOR_IS_ARM TRUE)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64|amd64)|(^i.86$)")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(x86_64)|(AMD64|amd64)|(^i.86$)")
set(PROCESSOR_IS_X86 TRUE)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
set(PROCESSOR_IS_POWER TRUE)

View File

@ -1,52 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bcc9bb0..3e382a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,9 @@ if(NOT CMAKE_BUILD_TYPE)
FORCE)
endif(NOT CMAKE_BUILD_TYPE)
+# An option to disable the executable target list_cpu_features.
+option(BUILD_EXECUTABLE "Build list_cpu_features executable." ON)
+
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
# it prominent in the GUI.
# cpu_features uses bit-fields which are - to some extends - implementation-defined (see https://en.cppreference.com/w/c/language/bit_field).
@@ -158,9 +161,11 @@ add_library(CpuFeature::cpu_features ALIAS cpu_features)
# program : list_cpu_features
#
+if(BUILD_EXECUTABLE)
add_executable(list_cpu_features ${PROJECT_SOURCE_DIR}/src/utils/list_cpu_features.c)
target_link_libraries(list_cpu_features PRIVATE cpu_features)
add_executable(CpuFeature::list_cpu_features ALIAS list_cpu_features)
+endif()
#
# ndk_compat
@@ -228,7 +233,7 @@ endif()
#
include(GNUInstallDirs)
-install(TARGETS cpu_features list_cpu_features
+install(TARGETS cpu_features
EXPORT CpuFeaturesTargets
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cpu_features
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
@@ -236,6 +241,16 @@ install(TARGETS cpu_features list_cpu_features
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+if(BUILD_EXECUTABLE)
+ install(TARGETS list_cpu_features
+ EXPORT CpuFeaturesTargets
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cpu_features
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
+ )
+endif()
install(EXPORT CpuFeaturesTargets
NAMESPACE CpuFeatures::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CpuFeatures

View File

@ -4,15 +4,10 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/cpu_features
REF "v${VERSION}"
SHA512 43085d11f58f314d696276c8543561d411a4156aa546d1e14ed3d8adffded5818f1ad4259b3ad38bb5d4167bd9084f78c725eb53509999a2349a749b9eb47007
SHA512 4e732f46b3b9efe48f0b6d06cfa87b3b25ed00e51c42de84c74cbbd4d66bd0974ff1a757b91574c6a3064cba6e5c2460117dd23b79b4136e5d1cd7e78dda47b1
HEAD_REF master
PATCHES
make_list_cpu_features_optional.patch
fix-windows.patch
)
# If feature "tools" is not specified, disable building/exporting executable targets.
# This is necessary so that downstream find_package(CpuFeatures) does not fail.
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tools BUILD_EXECUTABLE

View File

@ -1,7 +1,6 @@
{
"name": "cpu-features",
"version": "0.8.0",
"port-version": 1,
"version": "0.9.0",
"description": "A cross-platform C library to retrieve CPU features (such as available instructions) at runtime",
"homepage": "https://github.com/google/cpu_features",
"license": "Apache-2.0",
@ -18,8 +17,7 @@
],
"features": {
"tools": {
"description": "list_cpu_features command line tool",
"supports": "!(arm & osx)"
"description": "list_cpu_features command line tool"
}
}
}

View File

@ -1885,8 +1885,8 @@
"port-version": 0
},
"cpu-features": {
"baseline": "0.8.0",
"port-version": 1
"baseline": "0.9.0",
"port-version": 0
},
"cpuid": {
"baseline": "0.6.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "dfa189c9350c179c90db6f7dfe4352ecddcd2b6a",
"version": "0.9.0",
"port-version": 0
},
{
"git-tree": "5e090d7020fbfe7ca8a7c2f70b6cc3f4520f2fea",
"version": "0.8.0",