aboutsummaryrefslogtreecommitdiff
path: root/ports/simdjson
diff options
context:
space:
mode:
authorGriffin Downs <grdowns@microsoft.com>2019-03-12 11:29:31 -0700
committerGriffin Downs <grdowns@microsoft.com>2019-03-12 11:29:31 -0700
commitb29b874ae9007a4450b736cabbf3cd94a4ec6359 (patch)
tree09a031509ccb697d20dc0745bae6541bb694a2b0 /ports/simdjson
parentfe626490f0f3537fc85f47f76d5bcd16ea539dea (diff)
parentf24bd414ceeed5f4faad80405b87da4394c02d63 (diff)
downloadvcpkg-b29b874ae9007a4450b736cabbf3cd94a4ec6359.tar.gz
vcpkg-b29b874ae9007a4450b736cabbf3cd94a4ec6359.zip
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/grdowns/5580
Diffstat (limited to 'ports/simdjson')
-rw-r--r--ports/simdjson/CONTROL3
-rw-r--r--ports/simdjson/portfile.cmake41
2 files changed, 44 insertions, 0 deletions
diff --git a/ports/simdjson/CONTROL b/ports/simdjson/CONTROL
new file mode 100644
index 000000000..8c71eeee5
--- /dev/null
+++ b/ports/simdjson/CONTROL
@@ -0,0 +1,3 @@
+Source: simdjson
+Version: 2019-03-09
+Description: A extremely fast JSON library that can parse gigabytes of JSON per second
diff --git a/ports/simdjson/portfile.cmake b/ports/simdjson/portfile.cmake
new file mode 100644
index 000000000..f6b2f347a
--- /dev/null
+++ b/ports/simdjson/portfile.cmake
@@ -0,0 +1,41 @@
+include(vcpkg_common_functions)
+
+# https://github.com/Microsoft/vcpkg/issues/5418#issuecomment-470519894
+if(TARGET_TRIPLET MATCHES "^(x86|arm-)")
+ message(FATAL_ERROR "simdjson doesn't support x86 or 32-bit ARM architecture.")
+elseif(TARGET_TRIPLET MATCHES "^arm64")
+ message(FATAL_ERROR "simdjson doesn't support ARM64 architecture currently.")
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO lemire/simdjson
+ REF d2fa086198b77df44e7fa48b25200e118fa81eb0
+ SHA512 fe92b65e44502381d286b6a7c949055d185e56e7c244a5ab3086b2fe7da76ce81a966daa2d8459794ff0a911b426b1c77e1fc9ef0d616e20868621b1bb30cf67
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SIMDJSON_BUILD_STATIC)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DSIMDJSON_BUILD_STATIC=${SIMDJSON_BUILD_STATIC}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+)
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+
+# CMake integration test
+#vcpkg_test_cmake(PACKAGE_NAME ${PORT})