felipecrv opened a new issue, #34203:
URL: https://github.com/apache/arrow/issues/34203

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Without `-DBENCHMARK_STATIC_DEFINE` the Google Benchmark library declares 
symbols as `__declspec(dllexport)` and that confuses the linker when 
`benchmark::benchmark` is statically linked into our benchmarks.
   
   Google Benchmark itself gets built with the proper defines but binaries 
depending on it including the header without passing the correct define tell 
the linker to not look for the symbol in the static library.
   
   The clean CMake fix is to add the define to the interface library target:
   
   ```cmake
   target_compile_definitions(benchmark::benchmark INTERFACE 
BENCHMARK_STATIC_DEFINE)
   ```
   
   
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to