Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[benchmark] auto define BENCHMARK_STATIC_DEFINE at static-md triplet #40251

Open
TomieAi opened this issue Aug 3, 2024 · 2 comments
Open

[benchmark] auto define BENCHMARK_STATIC_DEFINE at static-md triplet #40251

TomieAi opened this issue Aug 3, 2024 · 2 comments
Assignees
Labels
category:question This issue is a question

Comments

@TomieAi
Copy link
Contributor

TomieAi commented Aug 3, 2024

Is your feature request related to a problem? Please describe.

if u installed benchmark with x64-windows-static-md as triplet its gona throw some external resolve error

I was puzzled why it dint work at static-md i thought its not compatible xD until I read on the export.h it seems u have to define BENCHMARK_STATIC_DEFINE if u want to use it on static-md.. but that breaks the convenience of vcpkg static-md triplet config.

Proposed solution

please just auto define BENCHMARK_STATIC_DEFINE this when static-md was used.

Describe alternatives you've considered

for now im doing this.. if I dint stumble on export.h I probably gave up on it right now xD

#define BENCHMARK_STATIC_DEFINE
#include <benchmark/benchmark.h>
#pragma comment ( lib, "Shlwapi.lib" )

Additional context

image

Error occurred by default that will puzzle you when u are in static-md mode.

image

@TomieAi TomieAi added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Aug 3, 2024
@TomieAi TomieAi changed the title [bencmark] Auto Define BENCHMARK_STATIC_DEFINE [bencmark] auto define BENCHMARK_STATIC_DEFINE at static-md triplet Aug 3, 2024
@TomieAi TomieAi changed the title [bencmark] auto define BENCHMARK_STATIC_DEFINE at static-md triplet [benchmark] auto define BENCHMARK_STATIC_DEFINE at static-md triplet Aug 3, 2024
@FrankXie05
Copy link
Contributor

@TomieAi This macro BENCHMARK_STATIC_DEFINE has been marked as a public macro by upstream.
And vcpkg has also been updated to the latest version to merge this content.
Please use the latest vcpkg to install the latest benchmark. :)

Upstream: google/benchmark#1457 google/benchmark#1470
Code: https://github.com/google/benchmark/blob/12235e24652fc7f809373e7c11a5f73c5763fc4c/src/CMakeLists.txt#L71

@FrankXie05 FrankXie05 added category:question This issue is a question and removed category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist labels Sep 24, 2024
@dg0yt
Copy link
Contributor

dg0yt commented Sep 24, 2024

@FrankXie05 "Burn-in library linkage" to resolve the issue for msbuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

4 participants