diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2019-09-03 11:40:35 -0700 |
|---|---|---|
| committer | dan-shaw <51385773+dan-shaw@users.noreply.github.com> | 2019-09-03 11:40:35 -0700 |
| commit | daab07dd9eda0f9903adb4f5f837ef29b4839eb5 (patch) | |
| tree | 234c3b39fa8e416f0933db82919b4b91167edc9d /ports | |
| parent | c866cb7059aa3c80746fc9ab7f8df9a069a00306 (diff) | |
| download | vcpkg-daab07dd9eda0f9903adb4f5f837ef29b4839eb5.tar.gz vcpkg-daab07dd9eda0f9903adb4f5f837ef29b4839eb5.zip | |
[dmlc] Add new port (#7549)
* [dmlc-core] Add new port
* rebuild
* Fix error building dynamic crt linkage
* Fix error building dynamic crt linkage
* Fix error building dynamic crt linkage
* Add openmp as feature
* Rename this port as dmlc
* remove dmlc core files
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/dmlc/CONTROL | 8 | ||||
| -rw-r--r-- | ports/dmlc/portfile.cmake | 43 |
2 files changed, 51 insertions, 0 deletions
diff --git a/ports/dmlc/CONTROL b/ports/dmlc/CONTROL new file mode 100644 index 000000000..1c16f0547 --- /dev/null +++ b/ports/dmlc/CONTROL @@ -0,0 +1,8 @@ +Source: dmlc +Version: 2019-08-12 +Homepage: https://github.com/dmlc/dmlc-core +Description: DMLC-Core is the backbone library to support all DMLC projects, offers the bricks to build efficient and scalable distributed machine learning libraries. +Default-Features: openmp + +Feature: openmp +Description: Build with openmp
\ No newline at end of file diff --git a/ports/dmlc/portfile.cmake b/ports/dmlc/portfile.cmake new file mode 100644 index 000000000..ae9797c61 --- /dev/null +++ b/ports/dmlc/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} currently doesn't supports UWP.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dmlc/dmlc-core + REF d3fd7c5e9b9c280d3081ada3fb62705547c00bf1 + SHA512 6887d52ddd00949866c27bea3c860abb8a7ecf61feeac79d67d260635e9c3e490b6f0538cbc0ccc1f03e90ab4094bfc0fcb938adb3fb5afe9fea813d47cc7430 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + openmp ENABLE_OPENMP +) + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(DMLC_FORCE_SHARED_CRT ON) +else() + set(DMLC_FORCE_SHARED_CRT OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDMLC_FORCE_SHARED_CRT=${DMLC_FORCE_SHARED_CRT} + -DUSE_OPENMP=${ENABLE_OPENMP} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/dmlc) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
\ No newline at end of file |
