mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 01:30:55 +08:00
[zix] Sanitize (#42772)
This commit is contained in:
parent
38bf1efc4e
commit
1bf29ad494
@ -1,33 +0,0 @@
|
||||
diff --git a/benchmark/bench.h b/benchmark/bench.h
|
||||
index bcfe077..b247e17 100644
|
||||
--- a/benchmark/bench.h
|
||||
+++ b/benchmark/bench.h
|
||||
@@ -15,6 +15,21 @@ bench_elapsed_s(const BenchmarkTime* start, const BenchmarkTime* end)
|
||||
((double)(end->tv_nsec - start->tv_nsec) * 0.000000001));
|
||||
}
|
||||
|
||||
+#ifdef _WIN32
|
||||
+#include <windows.h>
|
||||
+
|
||||
+static inline BenchmarkTime bench_start(void) {
|
||||
+ BenchmarkTime start_t;
|
||||
+ QueryPerformanceCounter(&start_t);
|
||||
+ return start_t;
|
||||
+}
|
||||
+
|
||||
+static inline double bench_end(const BenchmarkTime* start_t) {
|
||||
+ BenchmarkTime end_t;
|
||||
+ QueryPerformanceCounter(&end_t);
|
||||
+ return bench_elapsed_s(start_t, &end_t);
|
||||
+}
|
||||
+#else
|
||||
static inline BenchmarkTime
|
||||
bench_start(void)
|
||||
{
|
||||
@@ -30,5 +45,6 @@ bench_end(const BenchmarkTime* start_t)
|
||||
clock_gettime(CLOCK_REALTIME, &end_t);
|
||||
return bench_elapsed_s(start_t, &end_t);
|
||||
}
|
||||
+#endif
|
||||
|
||||
#endif // BENCH_H
|
@ -4,18 +4,19 @@ vcpkg_from_github(
|
||||
REF "v${VERSION}"
|
||||
SHA512 806b6b2e48bd0f1205958a63dd8aea73edb4b791c158cf9087c8fb2fad1111459ee6ed06428e04962ec98da4c38796b5c419573e0ffb65bdc5e7a1342387ef79
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
fix-win32.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_meson(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-Dbenchmarks=disabled
|
||||
-Ddocs=disabled
|
||||
-Dtests=disabled
|
||||
-Dtests_cpp=disabled
|
||||
)
|
||||
|
||||
vcpkg_install_meson()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "zix",
|
||||
"version": "0.4.2",
|
||||
"port-version": 1,
|
||||
"description": "Zix is a lightweight C library of portability wrappers and data structures.",
|
||||
"homepage": "https://github.com/drobilla/zix",
|
||||
"supports": "!uwp",
|
||||
|
@ -9982,7 +9982,7 @@
|
||||
},
|
||||
"zix": {
|
||||
"baseline": "0.4.2",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"zkpp": {
|
||||
"baseline": "0.2.3",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "f7224ec80cfaf4b20a79ae9d4907cfb51f47ccfa",
|
||||
"version": "0.4.2",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "500baf4d01fd4dc9143addf9d23ac2a9536f2b5a",
|
||||
"version": "0.4.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user