mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[cpuinfo,fbgemm,nnpack] update to latest source version and rename targets (#17063)
* [cpuinfo] update to latest * [cpuinfo] update baseline and port SHA * Update ports/cpuinfo/fix-install.patch Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/cpuinfo/fix-install.patch Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/cpuinfo/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/cpuinfo/fix-install.patch Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [cpuinfo] update port SHA * [cpuinfo] recover find_package * fixup target path to `share/unofficial-cpuinfo` * change IMPORTED target name to `unofficial::cpuinfo::cpuinfo` * [fbgemm] resolve failure after cpuinfo rename * change cpuinfo::cpuinfo to unofficial * [fbgemm] update port version * [nnpack] use changes target name * [nnpack] update port-version Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
This commit is contained in:
parent
27fe7a50db
commit
4ef97c2c33
@ -1,7 +0,0 @@
|
||||
Source: cpuinfo
|
||||
Version: 2019-07-28-1
|
||||
Description: CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)
|
||||
Homepage: https://github.com/pytorch/cpuinfo
|
||||
|
||||
Feature: tools
|
||||
Description: Build cpuinfo command-line tools
|
81
ports/cpuinfo/fix-install.patch
Normal file
81
ports/cpuinfo/fix-install.patch
Normal file
@ -0,0 +1,81 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e2d7d53..6d380e9 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -15,6 +15,28 @@ OPTION(CPUINFO_BUILD_UNIT_TESTS "Build cpuinfo unit tests" ON)
|
||||
OPTION(CPUINFO_BUILD_MOCK_TESTS "Build cpuinfo mock tests" ON)
|
||||
OPTION(CPUINFO_BUILD_BENCHMARKS "Build cpuinfo micro-benchmarks" ON)
|
||||
|
||||
+# Configuration
|
||||
+set(config_install_dir "lib/cmake/unofficial-${PROJECT_NAME}")
|
||||
+set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
||||
+set(project_config "${generated_dir}/unofficial-${PROJECT_NAME}Config.cmake")
|
||||
+set(targets_export_name "unofficial-${PROJECT_NAME}Targets")
|
||||
+set(namespace "unofficial::${PROJECT_NAME}::")
|
||||
+
|
||||
+# Include module with fuction 'write_basic_package_version_file'
|
||||
+include(CMakePackageConfigHelpers)
|
||||
+configure_package_config_file(
|
||||
+ "cmake/Config.cmake.in"
|
||||
+ "${project_config}"
|
||||
+ INSTALL_DESTINATION "${config_install_dir}"
|
||||
+)
|
||||
+install(FILES "${project_config}"
|
||||
+ DESTINATION "${config_install_dir}"
|
||||
+)
|
||||
+install(EXPORT "${targets_export_name}"
|
||||
+ NAMESPACE "${namespace}"
|
||||
+ DESTINATION "${config_install_dir}"
|
||||
+)
|
||||
+
|
||||
# ---[ CMake options
|
||||
INCLUDE(GNUInstallDirs)
|
||||
|
||||
@@ -210,7 +232,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$")
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE _WIN32_WINNT=0x0601)
|
||||
ENDIF()
|
||||
SET_TARGET_PROPERTIES(cpuinfo PROPERTIES PUBLIC_HEADER include/cpuinfo.h)
|
||||
-TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PUBLIC include)
|
||||
+TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
||||
TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PRIVATE src)
|
||||
TARGET_INCLUDE_DIRECTORIES(cpuinfo_internals BEFORE PUBLIC include src)
|
||||
IF(CPUINFO_LOG_LEVEL STREQUAL "default")
|
||||
@@ -261,6 +283,7 @@ TARGET_LINK_LIBRARIES(cpuinfo PRIVATE clog)
|
||||
TARGET_LINK_LIBRARIES(cpuinfo_internals PRIVATE clog)
|
||||
|
||||
INSTALL(TARGETS cpuinfo
|
||||
+ EXPORT "${targets_export_name}"
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in
|
||||
new file mode 100644
|
||||
index 0000000..9b4c9ee
|
||||
--- /dev/null
|
||||
+++ b/cmake/Config.cmake.in
|
||||
@@ -0,0 +1,4 @@
|
||||
+@PACKAGE_INIT@
|
||||
+
|
||||
+include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
|
||||
+check_required_components("@PROJECT_NAME@")
|
||||
diff --git a/deps/clog/CMakeLists.txt b/deps/clog/CMakeLists.txt
|
||||
index 083f519..43b5c78 100644
|
||||
--- a/deps/clog/CMakeLists.txt
|
||||
+++ b/deps/clog/CMakeLists.txt
|
||||
@@ -57,7 +57,7 @@ SET_TARGET_PROPERTIES(clog PROPERTIES
|
||||
C_EXTENSIONS NO)
|
||||
CLOG_TARGET_RUNTIME_LIBRARY(clog)
|
||||
SET_TARGET_PROPERTIES(clog PROPERTIES PUBLIC_HEADER include/clog.h)
|
||||
-TARGET_INCLUDE_DIRECTORIES(clog BEFORE PUBLIC include)
|
||||
+TARGET_INCLUDE_DIRECTORIES(clog PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
||||
IF(CLOG_LOG_TO_STDIO)
|
||||
TARGET_COMPILE_DEFINITIONS(clog PRIVATE CLOG_LOG_TO_STDIO=1)
|
||||
ELSE()
|
||||
@@ -68,6 +68,7 @@ IF(ANDROID AND NOT CLOG_LOG_TO_STDIO)
|
||||
ENDIF()
|
||||
|
||||
INSTALL(TARGETS clog
|
||||
+ EXPORT ${targets_export_name}
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
@ -1,26 +1,19 @@
|
||||
# On Windows, we can get a cpuinfo.dll, but it exports no symbols.
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_download_distfile(
|
||||
pull_22_patch_file
|
||||
URLS "https://github.com/pytorch/cpuinfo/compare/d5e37adf1406cf899d7d9ec1d317c47506ccb970...868bd113ed496a01cd030ab4d5b8853561f919a3.diff"
|
||||
FILENAME "cpuinfo-pull-22-868bd11.patch"
|
||||
SHA512 6971707e71613ca07fe0d18cb9c36cd5161177fc9ad3eb9e66f17a694559f3a95ccdad8f50e9342507a7978bd454f66e47c8a94db9077267ca302535b7cc3b59
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO pytorch/cpuinfo
|
||||
REF d5e37adf1406cf899d7d9ec1d317c47506ccb970
|
||||
SHA512 ecd2115340fa82a67db7889ce286c3070d5ab9c30b02372b08aac893e90ccebc65c6b3e66aa02a9ae9c57892d2d8c3b77cb836e5fc3b88df2c75d33e574d90d2
|
||||
REF 5916273f79a21551890fd3d56fc5375a78d1598d
|
||||
SHA512 50e537b61d991e8579577fb1ecf8d9ceb2171dbad96dfe159a062eadfdc0b2372b94988fc6f223c20e327453c7f55042ee06779f5b5fe0922f4470f746c9686b
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
${pull_22_patch_file}
|
||||
fix-install.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
tools CPUINFO_BUILD_TOOLS
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
tools CPUINFO_BUILD_TOOLS
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -28,23 +21,22 @@ vcpkg_configure_cmake(
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DCPUINFO_BUILD_TOOLS=OFF
|
||||
-DCPUINFO_LOG_LEVEL=debug
|
||||
OPTIONS_RELEASE
|
||||
${FEATURE_OPTIONS}
|
||||
-DCPUINFO_LOG_LEVEL=default
|
||||
OPTIONS
|
||||
-DCPUINFO_BUILD_UNIT_TESTS=OFF
|
||||
-DCPUINFO_BUILD_MOCK_TESTS=OFF
|
||||
-DCPUINFO_BUILD_BENCHMARKS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT})
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
if(tools IN_LIST FEATURES)
|
||||
if("tools" IN_LIST FEATURES)
|
||||
vcpkg_copy_tools(
|
||||
TOOL_NAMES cache-info cpuid-dump cpu-info isa-info
|
||||
AUTO_CLEAN
|
||||
|
11
ports/cpuinfo/vcpkg.json
Normal file
11
ports/cpuinfo/vcpkg.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "cpuinfo",
|
||||
"version-date": "2021-04-04",
|
||||
"description": "CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)",
|
||||
"homepage": "https://github.com/pytorch/cpuinfo",
|
||||
"features": {
|
||||
"tools": {
|
||||
"description": "Build cpuinfo command-line tools"
|
||||
}
|
||||
}
|
||||
}
|
@ -56,7 +56,7 @@ index 6f19a16..3c758d2 100644
|
||||
endif()
|
||||
|
||||
-if(NOT TARGET cpuinfo)
|
||||
+find_package(cpuinfo CONFIG REQUIRED) # target 'cpuinfo::cpuinfo'
|
||||
+find_package(unofficial-cpuinfo CONFIG REQUIRED) # target 'unofficial::cpuinfo::cpuinfo'
|
||||
+if(FALSE)
|
||||
#Download cpuinfo from github if CPUINFO_SOURCE_DIR is not specified.
|
||||
if(NOT DEFINED CPUINFO_SOURCE_DIR)
|
||||
@ -68,7 +68,7 @@ index 6f19a16..3c758d2 100644
|
||||
- PRIVATE "${ASMJIT_SRC_DIR}/src"
|
||||
- PRIVATE "${CPUINFO_SOURCE_DIR}/include")
|
||||
+)
|
||||
+target_link_libraries(fbgemm_generic PUBLIC asmjit::asmjit cpuinfo::cpuinfo)
|
||||
+target_link_libraries(fbgemm_generic PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo)
|
||||
|
||||
target_include_directories(fbgemm_avx2 BEFORE
|
||||
PUBLIC $<BUILD_INTERFACE:${FBGEMM_SOURCE_DIR}>
|
||||
@ -76,7 +76,7 @@ index 6f19a16..3c758d2 100644
|
||||
- PRIVATE "${ASMJIT_SRC_DIR}/src"
|
||||
- PRIVATE "${CPUINFO_SOURCE_DIR}/include")
|
||||
+)
|
||||
+target_link_libraries(fbgemm_avx2 PUBLIC asmjit::asmjit cpuinfo::cpuinfo)
|
||||
+target_link_libraries(fbgemm_avx2 PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo)
|
||||
|
||||
target_include_directories(fbgemm_avx512 BEFORE
|
||||
PUBLIC $<BUILD_INTERFACE:${FBGEMM_SOURCE_DIR}>
|
||||
@ -95,7 +95,7 @@ index 6f19a16..3c758d2 100644
|
||||
- $<TARGET_OBJECTS:fbgemm_avx2>
|
||||
- $<TARGET_OBJECTS:fbgemm_avx512>)
|
||||
+)
|
||||
+target_link_libraries(fbgemm_avx512 PUBLIC asmjit::asmjit cpuinfo::cpuinfo)
|
||||
+target_link_libraries(fbgemm_avx512 PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo)
|
||||
+
|
||||
+add_library(fbgemm
|
||||
+ $<TARGET_OBJECTS:fbgemm_generic>
|
||||
@ -131,7 +131,7 @@ index 6f19a16..3c758d2 100644
|
||||
-target_link_libraries(fbgemm $<BUILD_INTERFACE:asmjit>
|
||||
- $<BUILD_INTERFACE:cpuinfo>)
|
||||
-add_dependencies(fbgemm asmjit cpuinfo)
|
||||
+target_link_libraries(fbgemm PUBLIC asmjit::asmjit cpuinfo::cpuinfo)
|
||||
+target_link_libraries(fbgemm PUBLIC asmjit::asmjit unofficial::cpuinfo::cpuinfo)
|
||||
|
||||
install(TARGETS fbgemm EXPORT fbgemmLibraryConfig
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "fbgemm",
|
||||
"version-date": "2021-03-18",
|
||||
"port-version": 1,
|
||||
"description": "FB (Facebook) + GEMM (General Matrix-Matrix Multiplication)",
|
||||
"homepage": "https://code.fb.com/ml-applications/fbgemm/",
|
||||
"supports": "!(x86 | uwp)",
|
||||
|
@ -42,8 +42,8 @@ index 5ecd2df..8565044 100644
|
||||
"${CONFU_DEPENDENCIES_BINARY_DIR}/cpuinfo")
|
||||
ENDIF()
|
||||
-TARGET_LINK_LIBRARIES(nnpack PRIVATE cpuinfo)
|
||||
+find_package(cpuinfo CONFIG REQUIRED)
|
||||
+target_link_libraries(nnpack PUBLIC cpuinfo::cpuinfo)
|
||||
+find_package(unofficial-cpuinfo CONFIG REQUIRED)
|
||||
+target_link_libraries(nnpack PUBLIC unofficial::cpuinfo::cpuinfo)
|
||||
|
||||
# ---[ Configure pthreadpool
|
||||
-IF(NOT TARGET pthreadpool)
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "nnpack",
|
||||
"version-date": "2021-02-21",
|
||||
"port-version": 1,
|
||||
"description": "Acceleration package for neural networks on multi-core CPUs",
|
||||
"homepage": "https://github.com/Maratyszcza/NNPACK",
|
||||
"supports": "linux & osx",
|
||||
|
@ -1457,7 +1457,7 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"cpuinfo": {
|
||||
"baseline": "2019-07-28-1",
|
||||
"baseline": "2021-04-04",
|
||||
"port-version": 0
|
||||
},
|
||||
"cr": {
|
||||
@ -1934,7 +1934,7 @@
|
||||
},
|
||||
"fbgemm": {
|
||||
"baseline": "2021-03-18",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"fbthrift": {
|
||||
"baseline": "2020.10.19.00",
|
||||
@ -4286,7 +4286,7 @@
|
||||
},
|
||||
"nnpack": {
|
||||
"baseline": "2021-02-21",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"nonius": {
|
||||
"baseline": "2019-04-20-1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "28dbefcc9131ff8ce6fa939f7fcdb5cf0d4ee7fd",
|
||||
"version-date": "2021-04-04",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "4e4c0561ce8cb5f57c0a63ce070598dc1544acde",
|
||||
"version-string": "2019-07-28-1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "6f3e815d3e806243cddff7b0e262d130ef702e98",
|
||||
"version-date": "2021-03-18",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "7a439c159752233f767113ecf1a484065e223458",
|
||||
"version-date": "2021-03-18",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "42cc5d6dad2376e9322d715341bb0c8e2d1297b8",
|
||||
"version-date": "2021-02-21",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "bea4835350da5cce1c030ee7d9590fdae88860ae",
|
||||
"version-date": "2021-02-21",
|
||||
|
Loading…
x
Reference in New Issue
Block a user