aboutsummaryrefslogtreecommitdiff
path: root/ports/xtensor
diff options
context:
space:
mode:
authorGriffin Downs <grdowns@microsoft.com>2019-02-27 16:44:17 -0800
committerGriffin Downs <grdowns@microsoft.com>2019-02-27 16:44:17 -0800
commit1908903508bf057ad05d8a344e5bc55477944cb6 (patch)
tree2a23595f1e7d8cc9a6358bfd44a00eb7368d8a1b /ports/xtensor
parentb0a2ff18c9f2c9131aed131f5bf0d97c0e23da8e (diff)
parent8564602d06d7c4ce236f96a4f0f3ba7c2d769cb0 (diff)
downloadvcpkg-1908903508bf057ad05d8a344e5bc55477944cb6.tar.gz
vcpkg-1908903508bf057ad05d8a344e5bc55477944cb6.zip
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/grdowns/4802
Diffstat (limited to 'ports/xtensor')
-rw-r--r--ports/xtensor/CONTROL12
-rw-r--r--ports/xtensor/portfile.cmake51
2 files changed, 63 insertions, 0 deletions
diff --git a/ports/xtensor/CONTROL b/ports/xtensor/CONTROL
new file mode 100644
index 000000000..9b84a6ff3
--- /dev/null
+++ b/ports/xtensor/CONTROL
@@ -0,0 +1,12 @@
+Source: xtensor
+Version: 0.19.3
+Description: C++ tensors with broadcasting and lazy computing
+Build-Depends: nlohmann-json, xtl
+
+Feature: xsimd
+Description: xtensor with xsimd support
+Build-Depends: xsimd
+
+Feature: tbb
+Description: xtensor with tbb support
+Build-Depends: tbb
diff --git a/ports/xtensor/portfile.cmake b/ports/xtensor/portfile.cmake
new file mode 100644
index 000000000..99f52d195
--- /dev/null
+++ b/ports/xtensor/portfile.cmake
@@ -0,0 +1,51 @@
+# header-only library
+
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO QuantStack/xtensor
+ REF 0.19.3
+ SHA512 e3b0085115252441ef4ddf21ef48ca18c3872c24d7f94d2f7533fa8f4b00dff0b5613946296f9dd4d7db3381ff43b41dd2f1ae3857a409fabd439eade431aba2
+ HEAD_REF master
+)
+
+if("xsimd" IN_LIST FEATURES)
+ set(XTENSOR_USE_XSIMD ON)
+else()
+ set(XTENSOR_USE_XSIMD OFF)
+endif()
+
+if("tbb" IN_LIST FEATURES)
+ set(XTENSOR_USE_TBB ON)
+else()
+ set(XTENSOR_USE_TBB OFF)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DXTENSOR_USE_XSIMD=${XTENSOR_USE_XSIMD}
+ -DXTENSOR_USE_TBB=${XTENSOR_USE_TBB}
+ -DXTENSOR_ENABLE_ASSERT=OFF
+ -DXTENSOR_CHECK_DIMENSION=OFF
+ -DBUILD_TESTS=OFF
+ -DBUILD_BENCHMARK=OFF
+ -DDOWNLOAD_GTEST=OFF
+ -DDOWNLOAD_GBENCHMARK=OFF
+ -DDEFAULT_COLUMN_MAJOR=OFF
+ -DDISABLE_VS2017=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+
+# CMake integration test
+vcpkg_test_cmake(PACKAGE_NAME ${PORT})