mirror of https://github.com/microsoft/vcpkg.git
[fastpfor] add new port (#49746)
This commit is contained in:
parent
6f932b9730
commit
a7c451bd6c
|
|
@ -0,0 +1,18 @@
|
|||
diff --git a/cmake_modules/environment.cmake b/cmake_modules/environment.cmake
|
||||
index 8072ae8..9d05bcc 100644
|
||||
--- a/cmake_modules/environment.cmake
|
||||
+++ b/cmake_modules/environment.cmake
|
||||
@@ -1,10 +1,10 @@
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
-if (CMAKE_SYSTEM_PROCESSOR MATCHES "arm64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
|
||||
+if (CMAKE_SYSTEM_PROCESSOR MATCHES "[Aa][Rr][Mm]64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "[Aa][Rr][Mm]" OR CMAKE_SYSTEM_PROCESSOR MATCHES "[Aa][Rr][Cc][Hh]64")
|
||||
set(SUPPORT_NEON ON)
|
||||
endif ()
|
||||
|
||||
# Check if the Visual Studio build is targeting ARM
|
||||
-if (CMAKE_GENERATOR_PLATFORM MATCHES "ARM64" OR CMAKE_GENERATOR_PLATFORM MATCHES "ARM")
|
||||
+if (CMAKE_GENERATOR_PLATFORM MATCHES "[Aa][Rr][Mm]64" OR CMAKE_GENERATOR_PLATFORM MATCHES "[Aa][Rr][Mm]")
|
||||
set(SUPPORT_NEON ON)
|
||||
endif ()
|
||||
\ No newline at end of file
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO fast-pack/FastPFOR
|
||||
REF "v${VERSION}"
|
||||
SHA512 63eae397540e901e6b60420a92a165bbc16f35d97238221dac5d9d8819f40886a12edc17087d0aa2eeef706b8f411d1d19b77d6833d8bf34ad8340fa59f4cccf
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
remove-cpm.patch
|
||||
fix-arm-checker.patch
|
||||
)
|
||||
|
||||
file(REMOVE
|
||||
${SOURCE_PATH}/cmake_modules/CPM.cmake
|
||||
${SOURCE_PATH}/cmake_modules/Findsnappy.cmake
|
||||
${SOURCE_PATH}/cmake_modules/simde.cmake
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DFASTPFOR_WITH_TEST=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/FastPFOR")
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
"${CURRENT_PACKAGES_DIR}/share/doc"
|
||||
)
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c32c332..a72eada 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -13,7 +13,6 @@ set(CMAKE_C_STANDARD_REQUIRED True)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
|
||||
include(AppendCompilerFlags)
|
||||
|
||||
-include(cmake/CPM.cmake)
|
||||
|
||||
project(FastPFOR CXX C)
|
||||
set(PROJECT_URL "https://github.com/fast-pack/FastPFOR")
|
||||
@@ -40,7 +39,6 @@ if( SUPPORT_SSE42 )
|
||||
MESSAGE( STATUS "SSE 4.2 support detected" )
|
||||
else()
|
||||
if (SUPPORT_NEON)
|
||||
- include(simde)
|
||||
MESSAGE(STATUS "USING SIMDE FOR SIMD OPERATIONS")
|
||||
else ()
|
||||
MESSAGE(STATUS "SIMDE and SSE 4.2 support not detected")
|
||||
@@ -112,10 +110,9 @@ add_executable(csv2maropu src/csv2maropu.cpp)
|
||||
target_link_libraries(csv2maropu PRIVATE FastPFOR)
|
||||
|
||||
if (SUPPORT_NEON)
|
||||
- target_link_libraries(FastPFOR PUBLIC simde)
|
||||
- target_link_libraries(gapstats PUBLIC simde)
|
||||
- target_link_libraries(partitionbylength PUBLIC simde)
|
||||
- target_link_libraries(csv2maropu PUBLIC simde)
|
||||
+ find_path(SIMDE_INCLUDE_DIRS "simde/arm/neon.h")
|
||||
+ target_include_directories(FastPFOR PUBLIC ${SIMDE_INCLUDE_DIRS})
|
||||
+ target_compile_definitions(FastPFOR PUBLIC SIMDE_ENABLE_NATIVE_ALIASES)
|
||||
else()
|
||||
message(STATUS "SIMDE not used")
|
||||
endif()
|
||||
@@ -128,21 +125,21 @@ if( SUPPORT_SSE42 )
|
||||
target_link_libraries(benchbitpacking FastPFOR)
|
||||
endif()
|
||||
|
||||
-find_package(snappy)
|
||||
-if(NOT ${snappy_FOUND})
|
||||
+find_package(Snappy CONFIG)
|
||||
+if(NOT ${Snappy_FOUND})
|
||||
message(STATUS "Snappy was not found. codecssnappy and "
|
||||
"inmemorybenchmarksnappy targets are not available.")
|
||||
else()
|
||||
message(STATUS "Snappy was found. Building additional targets "
|
||||
"codecssnappy and inmemorybenchmarksnappy.")
|
||||
- include_directories(${snappy_INCLUDE_DIRS})
|
||||
+ include_directories(${Snappy_INCLUDE_DIRS})
|
||||
add_executable(codecssnappy src/codecs.cpp)
|
||||
set_target_properties(codecssnappy PROPERTIES DEFINE_SYMBOL USESNAPPY)
|
||||
- target_link_libraries(codecssnappy FastPFOR ${snappy_LIBRARIES})
|
||||
+ target_link_libraries(codecssnappy FastPFOR ${Snappy_LIBRARIES})
|
||||
|
||||
add_executable(inmemorybenchmarksnappy src/inmemorybenchmark.cpp)
|
||||
set_target_properties(inmemorybenchmarksnappy PROPERTIES DEFINE_SYMBOL USESNAPPY)
|
||||
- target_link_libraries(inmemorybenchmarksnappy FastPFOR ${snappy_LIBRARIES})
|
||||
+ target_link_libraries(inmemorybenchmarksnappy FastPFOR ${Snappy_LIBRARIES})
|
||||
endif()
|
||||
|
||||
option(FASTPFOR_WITH_TEST "Build with Google Test" ON)
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "fastpfor",
|
||||
"version": "0.3.1",
|
||||
"description": "Fast integer compression",
|
||||
"homepage": "https://github.com/fast-pack/FastPFOR",
|
||||
"license": "Apache-2.0",
|
||||
"supports": "!(arm & !arm64)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "simde",
|
||||
"platform": "arm"
|
||||
},
|
||||
"snappy",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -2936,6 +2936,10 @@
|
|||
"baseline": "0.6.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"fastpfor": {
|
||||
"baseline": "0.3.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"faudio": {
|
||||
"baseline": "26.2",
|
||||
"port-version": 0
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e9241b565fa01089f72ad03ebfc04af84c247977",
|
||||
"version": "0.3.1",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue