From a7038d857edcda1e1551e758a46481c42fd5c3e4 Mon Sep 17 00:00:00 2001 From: Joye Li Date: Wed, 12 Jun 2024 17:08:48 +0800 Subject: [PATCH 1/2] add libsimdpp from CHChang810716 --- cmake/projects/libsimdpp/hunter.cmake | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 cmake/projects/libsimdpp/hunter.cmake diff --git a/cmake/projects/libsimdpp/hunter.cmake b/cmake/projects/libsimdpp/hunter.cmake new file mode 100644 index 0000000000..41cf58d66e --- /dev/null +++ b/cmake/projects/libsimdpp/hunter.cmake @@ -0,0 +1,33 @@ +# Copyright (c) 2017, Pawel Bylica + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + libsimdpp + VERSION + 2.1-p0 + URL + "https://github.com/CHChang810716/libsimdpp/archive/v2.1-p0.tar.gz" + SHA1 + 0bf0a759fb4d41104e5d96bf85be8c2ef851d284 +) +hunter_add_version( + PACKAGE_NAME + libsimdpp + VERSION + 2.x-p0 + URL + "https://github.com/CHChang810716/libsimdpp/archive/c81f999e51edd9fce76ab9c0e858cf64c2a14034.zip" + SHA1 + ad22abd3e376ab38ab022af8695232df2c4b02fd +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(libsimdpp) +hunter_download(PACKAGE_NAME libsimdpp) From 161d924b5467924d5f960464084f0e0a68a82f4c Mon Sep 17 00:00:00 2001 From: Joye Li Date: Wed, 12 Jun 2024 17:22:04 +0800 Subject: [PATCH 2/2] update libsimdpp --- cmake/configs/default.cmake | 1 + examples/libsimdpp/CMakeLists.txt | 15 +++++++++++++++ examples/libsimdpp/main.cpp | 6 ++++++ 3 files changed, 22 insertions(+) create mode 100644 examples/libsimdpp/CMakeLists.txt create mode 100644 examples/libsimdpp/main.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 7eb83b8479..36f328615e 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -380,6 +380,7 @@ hunter_default_version(libogg VERSION 1.3.3-p0) hunter_default_version(libpcre VERSION 8.41) hunter_default_version(librtmp VERSION 2.4.0-p0) hunter_default_version(libscrypt VERSION 1.21-p1) +hunter_default_version(libsimdpp VERSION 2.x-p0) hunter_default_version(libsodium VERSION 1.0.16-p0) hunter_default_version(libunibreak VERSION 4.0) hunter_default_version(libusb VERSION 1.0.23) diff --git a/examples/libsimdpp/CMakeLists.txt b/examples/libsimdpp/CMakeLists.txt new file mode 100644 index 0000000000..de8af40723 --- /dev/null +++ b/examples/libsimdpp/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.2) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(libsimdpp-test) + +# DOCUMENTATION_START { +hunter_add_package(libsimdpp) +find_package(libsimdpp CONFIG REQUIRED) + +add_executable(libsimdpp_test main.cpp) +target_link_libraries(libsimdpp_test libsimdpp::simdpp) +# DOCUMENTATION_END } diff --git a/examples/libsimdpp/main.cpp b/examples/libsimdpp/main.cpp new file mode 100644 index 0000000000..92b791d0a4 --- /dev/null +++ b/examples/libsimdpp/main.cpp @@ -0,0 +1,6 @@ +#include +int main() { + simdpp::uint8<32> a; + simdpp::uint8<32> b; + auto c = a + b; +} \ No newline at end of file