From a511b4376610088ad8d26f942a79404c62b7e44b Mon Sep 17 00:00:00 2001 From: ppenguin Date: Sat, 25 Apr 2020 05:01:02 +0800 Subject: [PATCH] [frozen] Add frozen library (#10766) --- ports/frozen/CONTROL | 4 ++++ ports/frozen/portfile.cmake | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 ports/frozen/CONTROL create mode 100644 ports/frozen/portfile.cmake diff --git a/ports/frozen/CONTROL b/ports/frozen/CONTROL new file mode 100644 index 000000000..36b29085c --- /dev/null +++ b/ports/frozen/CONTROL @@ -0,0 +1,4 @@ +Source: frozen +Version: 1.0.0 +Description: Header-only library that provides 0 cost initialization for immutable containers and various algorithms. Frozen provides:immutable (a.k.a. frozen), constexpr-compatible versions of std::set, std::unordered_set, std::map and std::unordered_map and 0-cost initialization version of std::search for frozen needles using Boyer-Moore or Knuth-Morris-Pratt algorithms. +Homepage: https://github.com/serge-sans-paille/frozen diff --git a/ports/frozen/portfile.cmake b/ports/frozen/portfile.cmake new file mode 100644 index 000000000..7225ae815 --- /dev/null +++ b/ports/frozen/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO serge-sans-paille/frozen + REF b5735474fdaa28753c1dae515df5a4fdb45d94dd + SHA512 b175a03b4a0263937e176675558e2df0bd4174799e2c5d7138842235fa24be57bccd8b96fddb5791e055b9de44211063f195142de73acf9d4f52a9a37f7055cc + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -Dfrozen.tests=OFF +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/frozen TARGET_PATH share/frozen) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)