diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/ctbench | |
Diffstat (limited to 'vcpkg/ports/ctbench')
| -rw-r--r-- | vcpkg/ports/ctbench/fix_build_with_boost_1_88_0.diff | 22 | ||||
| -rw-r--r-- | vcpkg/ports/ctbench/portfile.cmake | 26 | ||||
| -rw-r--r-- | vcpkg/ports/ctbench/vcpkg.json | 29 |
3 files changed, 77 insertions, 0 deletions
diff --git a/vcpkg/ports/ctbench/fix_build_with_boost_1_88_0.diff b/vcpkg/ports/ctbench/fix_build_with_boost_1_88_0.diff new file mode 100644 index 0000000..48ed44f --- /dev/null +++ b/vcpkg/ports/ctbench/fix_build_with_boost_1_88_0.diff @@ -0,0 +1,22 @@ +diff --git a/compiler-launcher/compiler-launcher.cpp b/compiler-launcher/compiler-launcher.cpp
+index f106ff5..c2820e0 100644
+--- a/compiler-launcher/compiler-launcher.cpp
++++ b/compiler-launcher/compiler-launcher.cpp
+@@ -21,7 +21,7 @@
+ #include <string>
+ #include <string_view>
+
+-#include <boost/process.hpp>
++#include <boost/process/v1/system.hpp>
+
+ #include <nlohmann/json.hpp>
+
+@@ -55,7 +55,7 @@ inline int get_timetrace_file(std::filesystem::path const time_trace_file_dest,
+ using exec_clock_t = ch::steady_clock;
+
+ exec_clock_t::time_point const exec_t0 = exec_clock_t::now();
+- int const exit_code = boost::process::system(command_args);
++ int const exit_code = boost::process::v1::system(command_args);
+ exec_clock_t::time_point const exec_t1 = exec_clock_t::now();
+
+ // Check child exit code
diff --git a/vcpkg/ports/ctbench/portfile.cmake b/vcpkg/ports/ctbench/portfile.cmake new file mode 100644 index 0000000..1f29a1f --- /dev/null +++ b/vcpkg/ports/ctbench/portfile.cmake @@ -0,0 +1,26 @@ +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 7ddc634650f392923f0f511fb3b494a6e1add2a9 + SHA512 7acc45c383541fa2fc518585b1358e61103ae52c9e880df3d44b857489ea5c2d5fe004c810f60f3246f5d175d61ba80435e09ac1f2ce6a8a4dc63b8c1881f0f3 + HEAD_REF main + PATCHES + fix_build_with_boost_1_88_0.diff +) + +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/vcpkg/ports/ctbench/vcpkg.json b/vcpkg/ports/ctbench/vcpkg.json new file mode 100644 index 0000000..fa12ba5 --- /dev/null +++ b/vcpkg/ports/ctbench/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "ctbench", + "version": "1.3.4", + "port-version": 2, + "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 + } + ] +} |