From f11cac522a2435d14e26f145edaf70a74ed74ee2 Mon Sep 17 00:00:00 2001 From: Jules Date: Mon, 17 Jul 2023 22:08:24 +0200 Subject: [PATCH] [ctbench] Add portfile (#31716) --- ports/ctbench/portfile.cmake | 24 ++++++++++++++++++++++++ ports/ctbench/vcpkg.json | 28 ++++++++++++++++++++++++++++ scripts/ci.baseline.txt | 1 + versions/baseline.json | 4 ++++ versions/c-/ctbench.json | 9 +++++++++ 5 files changed, 66 insertions(+) create mode 100644 ports/ctbench/portfile.cmake create mode 100644 ports/ctbench/vcpkg.json create mode 100644 versions/c-/ctbench.json diff --git a/ports/ctbench/portfile.cmake b/ports/ctbench/portfile.cmake new file mode 100644 index 0000000000..d9ce9f30dd --- /dev/null +++ b/ports/ctbench/portfile.cmake @@ -0,0 +1,24 @@ +message(WARNING "Building ${PORT} requires a C++20 compliant compiler. GCC 12 and Clang 15 are known to work.") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jpenuchot/ctbench + REF "v${VERSION}" + SHA512 6dd3d28f57fd80b4ce06fad71cdb60bf0aec28e475183314b1c37af093e9e696a7aa58516c4d4580e26bc88a9ada02216e8e2043e2afc8ec60bd25d5dde14de8 + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DCTBENCH_ENABLE_TESTS=OFF + -DCTBENCH_ENABLE_DOCS=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ctbench + TOOLS_PATH bin/) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/ctbench/vcpkg.json b/ports/ctbench/vcpkg.json new file mode 100644 index 0000000000..bcd7d52ad0 --- /dev/null +++ b/ports/ctbench/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "ctbench", + "version": "1.3.3", + "description": "Compiler-assisted variable size benchmarking for the study of C++ metaprogram compile times.", + "homepage": "https://github.com/JPenuchot/ctbench", + "documentation": "https://jpenuchot.github.io/ctbench-docs/", + "license": "MIT", + "supports": "!windows", + "dependencies": [ + "boost-container", + "boost-process", + "fmt", + { + "name": "llvm", + "default-features": false + }, + "nlohmann-json", + "sciplot", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index b81a6e1fc7..dce6b1bffc 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -271,6 +271,7 @@ crashpad:x64-linux=fail cserialport:arm-neon-android=fail cserialport:arm64-android=fail cserialport:x64-android=fail +ctbench:x64-osx=fail cubeb:arm-neon-android=fail cubeb:arm64-android=fail cubeb:x64-android=fail diff --git a/versions/baseline.json b/versions/baseline.json index 747747ebb4..f7b596a30e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1916,6 +1916,10 @@ "baseline": "67", "port-version": 3 }, + "ctbench": { + "baseline": "1.3.3", + "port-version": 0 + }, "ctbignum": { "baseline": "2019-08-02", "port-version": 3 diff --git a/versions/c-/ctbench.json b/versions/c-/ctbench.json new file mode 100644 index 0000000000..76a097da63 --- /dev/null +++ b/versions/c-/ctbench.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "a53ddf49e4e46a3e876af7be40a08c6016ecc5b7", + "version": "1.3.3", + "port-version": 0 + } + ] +}